createPalette()
The createPalette
function allows you to generate a palette of colors based on a given Spectrum
instance.
Each key in the palette object represents a lightness value from 0 to 100, and the corresponding value is a Spectrum
object.
Usage
Parameters
createPalette(colorObj)
Parameter | Type | Required | Description |
---|---|---|---|
colorObj | Spectrum instance | true | The color from which will be generated a palette |
Return Value
The colorMix
function returns a palette object with lightness values from 0 to 100 as keys,
where each key corresponds to a Spectrum
instance representing a color with the specified lightness.
The keys step is equal to 1, thus, there are 101 values inside the palette object.