@tempots/color

xyz2lab() function

Converts XYZ color space to LAB color space.

Signature:

xyz2lab: (xyz: XYZ, whiteReference?: [number, number, number]) => LAB

Parameters

Parameter

Type

Description

xyz

XYZ

The XYZ color to convert.

whiteReference

[number, number, number]

(Optional) The white reference color. Defaults to WHITE_REFERENCE.

Returns: LAB

The LAB color in the LAB color space.