UNPKG

ts-useful

Version:

Functions for animation, color transitions, ecliptic, bezier, decasteljau, curves, three dimensional curves, smooth scrolling, random range, randomItem, mobius index, vectors, physics vectors, and easing.

14 lines 496 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RandomColor = void 0; const randomrange_1 = require("./randomrange"); /** * * @returns hex string */ const RandomColor = () => { const [r, g, b] = Array.apply(null, new Array(3)).map(() => (0, randomrange_1.RandomRange)(0, 255)); return `#${(1 << 24 | (r << 16) | (g << 8) | (b << 0)).toString(16).slice(1)}`; }; exports.RandomColor = RandomColor; //# sourceMappingURL=randomColor.js.map