@tempots/color
LCH class
Represents a color in the LCH color space.
Signature:
declare class LCH
Constructors
Constructor |
Modifiers |
Description |
---|---|---|
Creates a new instance of the LCH color. |
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
|
number |
The chroma value of the LCH color. | |
|
(other: LCH, tollerance?: number) => boolean |
Checks if the LCH color is equal to another LCH color. | |
|
number |
The hue value of the LCH color. | |
|
number |
The luminance value of the color in the LCH color space. | |
|
([l, c, h]: [l: number, c: number, h: number]) => LCH | ||
|
() => [number, number, number] |
Converts the LCH color to an array of channels. | |
|
() => string |
Returns a string representation of the LCH color. | |
|
(c: number) => LCH |
Creates a new LCH color with the specified chroma value. | |
|
(h: number) => LCH |
Sets the hue value of the LCH color and returns a new LCH color instance. | |
|
(l: number) => LCH |
Returns a new LCH color with the specified lightness value. |