@tempots/color
rgb2lab() function
Converts an RGB color to the LAB color space.
Signature:
rgb2lab: (rgb: RGB, whiteReference?: [number, number, number]) => LAB
Parameters
Parameter |
Type |
Description |
---|---|---|
rgb |
The RGB color to convert. | |
whiteReference |
[number, number, number] |
(Optional) The white reference used for the conversion. Defaults to WHITE_REFERENCE. |
Returns: LAB
The LAB color representation of the input RGB color.