phi-color
v1.2.0
Published
Generate random colors with a given sphere in the HCL color space using the Golden Ratio
Downloads
3
Readme
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. Amagnitude
of 0 will returnn
colors identical to theorigin
, while a magnitudes above 1 will create entirely disparate colorsn
: The number of colors to generate
Returns
Array
of color strings of lengthn
examples
- Return 10 colors as line-delimited hex from a
steelblue
origin: https://github.com/stamen/phi-color/blob/main/examples/random-colors.js