@tempots/color

hsl2lab() function

Converts an HSL color to LAB color.

Signature:

hsl2lab: (hsl: HSL, whiteReference?: [number, number, number]) => LAB

Parameters

Parameter

Type

Description

hsl

HSL

The HSL color to convert.

whiteReference

[number, number, number]

(Optional) The white reference color used for conversion. Defaults to WHITE_REFERENCE.

Returns: LAB

The LAB color representation of the input HSL color.