Const
Get a random color. You can specify if you want a light or dark color, which is based on Colord.brighness()
.
Colord object.
const randomColor = getRandomColor();
const randomLightColor = getRandomColor(true);
const randomDarkColor = getRandomColor(false);
Optional
isLight: boolean(Optional) If true
, the color will be light. If false
, the color will be dark. If undefined
, the color will be random.
Generated using TypeDoc
Parses the given input color and creates a new
Colord
instance. See accepted input formats: https://github.com/omgovich/colord#color-parsing