ReferenceSamplersFunction
randomHue()
Picks colors with a random hue.
see oklch.com
function randomHue(options: RandomHueOptions): SamplerFn<Color>;Creates a sampler for colors of the same lightness and intensity, with a random hue.
Because Oklch is perceptually uniform, all hues come out equally bright, which makes for even, rainbow-like mixes.
Parameters
Section titled “Parameters”optionsRandomHueOptionsThe lightness, chroma and opacity shared by all colors.
Returns
Section titled “Returns”Throws
Section titled “Throws”- PartyJSError
If the supplied chroma is negative.
Example
Section titled “Example”const color = randomHue({ l: 0.7, c: 0.15 });