@tempots/color
LAB class
Represents a color in the CIELAB color space.
Signature:
declare class LAB
Constructors
Constructor |
Modifiers |
Description |
---|---|---|
Constructs an LAB color instance. |
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
|
number | ||
|
number | ||
|
(other: LAB, tollerance?: number) => boolean |
Compares this LAB color to another for equality, within a tolerance. | |
|
(s: string) => LAB |
Creates an LAB color instance from a string representation. | |
|
number | ||
|
([lightness, a, b]: [lightness: number, a: number, b: number]) => LAB |
Creates an LAB color instance from individual channel values. | |
|
() => [number, number, number] |
Returns the LAB color as an array of its components. | |
|
() => string |
Returns a string representation of the LAB color. | |
|
(a: number) => LAB |
Returns a new LAB instance with the specified a component. | |
|
(b: number) => LAB |
Returns a new LAB instance with the specified b component. | |
|
(l: number) => LAB |
Returns a new LAB instance with the specified lightness. |