Function Signature
js
hexToOklab(hex: string): { L: number, a: number, b: number }Parameters
hex(string): HEX color string in#rgbor#rrggbbformat.
Return Value
An OKLab object with L, a, and b channels.
js
hexToOklab("#ff6600");
// { L: 0.6958..., a: 0.1775..., b: 0.101... }Usage Notes
- Throws if the HEX input is invalid.
- Useful before OKLab interpolation or analysis.