colorToOklch
Convert a Color to an Oklch value, normalizing the hue to [0, 360). The other channels are copied unchanged.
import { colorToOklch } from '@pbroom/color-kit';oklch.ts:162function colorToOklch(color: Color): Oklch;Parameters
Returns
Example
import { colorToOklch } from '@pbroom/color-kit';
colorToOklch({ l: 0.7, c: 0.1, h: 400, alpha: 1 }); // → { l: 0.7, c: 0.1, h: 40, alpha: 1 }