@tempots/color

srgb2lab() function

Converts an SRGB color to LAB color space.

Signature:

srgb2lab: (srgb: SRGB, whiteReference?: [number, number, number]) => LAB

Parameters

Parameter

Type

Description

srgb

SRGB

The SRGB 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 SRGB color.