Skip to content

labToLch

labToLch<S>(value): InSpace<LchCoords, S>

Defined in: packages/math-color/src/conversions/lab-lch.ts:19

Converts any Lab-family colour (CIE L_a_b* or OKLab) to its cylindrical LCH representation, preserving the correct paired space brand.

Note: h is undefined for achromatic colours (a = 0, b = 0 => C = 0). Returns h = 0 in that case, consistent with CIE convention.

S extends string

InSpace<LabCoords, S>

InSpace<LchCoords, S>