toOklch
Copy a Color into a new Oklch object. Color already is OKLCH, so channels are copied unchanged (the hue is not normalized).
import { toOklch } from '@pbroom/color-kit';index.ts:359function toOklch(color: Color): Oklch;Parameters
Returns
OklchA new Oklch with the same channels
Example
import { parse, toOklch } from '@pbroom/color-kit';
toOklch(parse('oklch(0.7 0.15 30)')); // → { l: 0.7, c: 0.15, h: 30, alpha: 1 }