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) 268 B
/** * Generate random hex color * @return {string} - Random hey color value */ export function colorand() { let color; do { color = Math.floor( Math.random() * 16777215 ).toString( 16 ); } while ( color.length !== 6 ); return '#' + color; }