@microsoft/fast-colors > labToLCH
labToLCH() function
Converts a ColorLAB to a ColorLCH
Signature:export declare function labToLCH(lab: ColorLAB): ColorLCH;
Parameters
Parameter | Type | Description |
---|---|---|
lab | ColorLAB | the lab color to convert |
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 In cases where both a and b are very near zero this function will return an LCH color with an H of 0 More info about the atan2 function: https://en.wikipedia.org/wiki/Atan2