@microsoft/fast-colors > ColorLAB
ColorLAB class
CIELAB color space This implementation uses the D65 constants for 2 degrees. That determines the constants used for the pure white point of the XYZ space of 0.95047, 1.0, 1.08883. https://en.wikipedia.org/wiki/Illuminant_D65 These constants determine how the XYZ, LCH and LAB colors convert to/from RGB.
Signature:export declare class ColorLAB
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(l, a, b) | Constructs a new instance of the ColorLAB class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
a | number | ||
b | number | ||
epsilon | static | number | |
kappa | static | number | |
l | number |
Methods
Method | Modifiers | Description |
---|---|---|
equalValue(rhs) | Determines if a color is equal to another | |
fromObject(data) | static | Construct a ColorLAB from a config object. |
roundToPrecision(precision) | Returns a new ColorLAB rounded to the provided precision | |
toObject() | Returns the ColorLAB formatted as an object. |