toOklabInto
Convert a Color to OKLab, writing into out (allocation-free). Bit-identical to toOklab.
import { toOklabInto } from '@pbroom/color-kit';into.ts:55function toOklabInto( out: Oklab, , color: Color,): Oklab;Parameters
Returns
Oklabout
Example
import { parse, toOklabInto } from '@pbroom/color-kit';
const lab = { L: 0, a: 0, b: 0, alpha: 1 };
toOklabInto(lab, parse('#3b82f6'));
lab.L; // → ≈ 0.6231