1.2.0 • Published 3 years ago
phi-color v1.2.0
phi-color
Generate random colors within a given sphere in the HCL color space using the Golden Ratio
usage
phiColor(origin, magitude, n)Parameters
origin: The color string that should be used as the perceptual center for the color palettemagnitude: The magnitude as a proportion of each dimension of HCL that colors should be created within. Amagnitudeof 0 will returnncolors identical to theorigin, while a magnitudes above 1 will create entirely disparate colorsn: The number of colors to generate
Returns
Arrayof color strings of lengthn
examples
- Return 10 colors as line-delimited hex from a
steelblueorigin: https://github.com/stamen/phi-color/blob/main/examples/random-colors.js