Function toOklab
Converts OKLCH to Cartesian Oklab coordinates.
Use this when an OKLCH value must enter an Oklab-based calculation or conversion path. Complete hue revolutions represent the same direction and do not modify the stored OKLCH value. Negative chroma remains valid raw mathematical input.
Parameters
| Name | Description |
|---|---|
| color | OKLCH value to convert. |
Returns
The corresponding Cartesian Oklab value.
See Also
toOklch
Example
const neutral = Oklchd(
0.5,
0.0,
OklabHued .fromDegrees(725.0)
) .toOklab;
assert(neutral == Oklabd(0.5, 0.0, 0.0));