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.
10 lines • 335 B
JavaScript
import { RandomRange } from './randomrange';
/**
*
* @returns hex string
*/
export const RandomColor = () => {
const [r, g, b] = Array.apply(null, new Array(3)).map(() => RandomRange(0, 255));
return `#${(1 << 24 | (r << 16) | (g << 8) | (b << 0)).toString(16).slice(1)}`;
};
//# sourceMappingURL=randomColor.js.map