Types
CssNamedColor
A string
of a
CSS named color,
such as 'red'
, 'blue'
, 'black'
or 'lightseagreen'
.
Can be used to initialize a Spectrum
instance.
Type Definition
HslObj
An HSL object that represents a color in the HSLA (Hue, Saturation, Lightness, Alpha) color space.
Key | Description | Type | Valid range |
---|---|---|---|
h | Hue (color tone) | number | [0; 360] |
s | Saturation (color intensity) | number | [0; 1] |
l | Lightness (brightness) | number | [0; 1] |
a | Alpha channel (opacity) | number | [0; 1] |
Type Definition
RgbObj
An RGB object that represents a color in the RGBA (Red, Green, Blue, Alpha) color space.
Key | Description | Type | Valid range |
---|---|---|---|
r | Red | number | [0; 255] |
g | Green | number | [0; 255] |
b | Blue | number | [0; 255] |
a | Alpha channel (opacity) | number | [0; 1] |