Skip to content

Generate random colors with a given sphere in the HCL color space using the Golden Ratio

License

Notifications You must be signed in to change notification settings

stamen/phi-color

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 palette
  • magnitude: The magnitude as a proportion of each dimension of HCL that colors should be created within. A magnitude of 0 will return n colors identical to the origin, while a magnitudes above 1 will create entirely disparate colors
  • n: The number of colors to generate

Returns

  • Array of color strings of length n

examples

About

Generate random colors with a given sphere in the HCL color space using the Golden Ratio

Resources

License

Stars

Watchers

Forks

Packages

No packages published