UNPKG

@kcuf/mere-color

Version:

Mere color utils for generating, manipulation, a11y purposes.

16 lines (15 loc) 433 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = random; var _util = require("../util"); var _enum = require("../enum"); function random() { var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _enum.EColorNotation.HEX; return (0, _util.toColorString)({ r: Math.random() * 255, g: Math.random() * 255, b: Math.random() * 255 }, format); }