@kcuf/mere-color
Version:
Mere color utils for generating, manipulation, a11y purposes.
11 lines • 379 B
JavaScript
import { toColorString } from '../util';
import { EColorNotation } from '../enum';
export default function random() {
var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EColorNotation.HEX;
return toColorString({
r: Math.random() * 255,
g: Math.random() * 255,
b: Math.random() * 255
}, format);
}
//# sourceMappingURL=random.js.map