@tempots/color

srgb2lch() function

Converts an sRGB color to LCH color.

Signature:

srgb2lch: (srgb: SRGB, whiteReference?: [number, number, number]) => LCH

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: LCH

The converted LCH color.