the name of the channel from the current color space to retrieve
the value of the channel matching the provided key
Returns a hex string representing the RGB color space. This ignores any
alpha values.
Example
color.toString() // rgb(185,130,91)
color.toHexString() // #b9825b
color.toHexString(true) // b9825b
will return the hex value without a hashtag if true, otherwise will return with hashtag
Returns this color space model. This record contains named channels and their corresponding values.
the color model record
Retrieves the value of the red channel for the current color space.
the red channel value of this color space
Retrieves the value of the green channel for the current color space.
the green channel value of this color space
Retrieves the value of the alpha channel for the current color space.
the alpha channel value of this color space
Retrieves the value of the blue channel for the current color space.
the blue channel value of this color space
Retrieves an array representing the RGBA color space containing the primary colors and alpha values. Array index is ordered logically [RGBA].
the RGBA color space values as an array
Generated using TypeDoc
Retrieves a color channel from the color model via key.
Here's a simple example retrieving each channel of the RGBA space