UNPKG

@squirrel-forge/ui-util

Version:

A collection of utilities, classes, functions and abstracts made for the browser and babel compatible.

12 lines (11 loc) 276 B
/** * Generate random hex color * @return {string} - Random hey color value */ export function colorand() { let color = Math.floor( Math.random() * 16777215 ).toString( 16 ); while ( color.length < 6 ) { color = '0' + color; } return '#' + color; }