@microsoft/fast-colors > ColorXYZ
ColorXYZ class
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 ColorXYZ
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(x, y, z) | Constructs a new instance of the ColorXYZ class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
whitePoint | static | ColorXYZ | D65 2 degree white point |
x | number | ||
y | number | ||
z | number |
Methods
Method | Modifiers | Description |
---|---|---|
equalValue(rhs) | Determines if a color is equal to another | |
fromObject(data) | static | Construct a ColorXYZ from a config object. |
roundToPrecision(precision) | Returns a new ColorXYZ rounded to the provided precision | |
toObject() | Returns the ColorXYZ formatted as an object. |