@microsoft/fast-colors > labToLCH

labToLCH() function

Converts a ColorLAB to a ColorLCH

Signature:
export declare function labToLCH(lab: ColorLAB): ColorLCH;

Parameters

ParameterTypeDescription
labColorLABthe lab color to convert
Returns:

ColorLCH

Remarks

The discontinuity in the C parameter at 0 means that floating point errors will often result in values near 0 giving unpredictable results. EG: 0.0000001 gives a very different result than -0.0000001 More info about the atan2 function: https://en.wikipedia.org/wiki/Atan2