Function Signature
js
oklchToRgb(L: number, C: number, h: number): { r: number, g: number, b: number }Parameters
L(number): OKLCH lightness.C(number): OKLCH chroma.h(number): OKLCH hue angle in degrees.
Return Value
An RGB object with integer r, g, and b channels clamped to 0-255.
js
const lch = hexToOklch("#ff6600");
oklchToRgb(lch.L, lch.C, lch.h);
// { r: 255, g: 102, b: 0 }Usage Notes
- Hue values are normalized around the 0-360 range.
- Out-of-gamut colors are clipped to valid sRGB.