toOklab
Convert a Color to OKLab (the rectangular form of OKLCH). Exact; no gamut clipping.
import { toOklab } from '@pbroom/color-kit';index.ts:319function toOklab(color: Color): Oklab;Parameters
Returns
Example
import { parse, toOklab } from '@pbroom/color-kit';
toOklab(parse('oklch(0.7 0.1 0)')); // → { L: 0.7, a: 0.1, b: 0, alpha: 1 }