Package Exports
- @chriscodesthings/random-css-hex-color
- @chriscodesthings/random-css-hex-color/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@chriscodesthings/random-css-hex-color) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
random-css-hex-color ·

Generates a random color in CSS hex format
Install
npm install --save @chriscodesthings/random-css-hex-colorUse
import randomHexColor from '@chriscodesthings/random-css-hex-color';
console.log(randomHexColor());
// => #c7a34bSyntax
randomHexColor(dark);Parameters
- dark: If undefined, any color is returned. If true, color is dark based on YIQ calculation. If false, color is light based on YIQ calculation.
Return Value
Returns a CSS hex color code string.
Description
Does what it says on the tin.