Skip to content
colors

oklchToRgb

The `oklchToRgb` function converts OKLCH values back to RGB channel values.

1 min read62 words

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.

Previous

rgbToOklch

Next

hexToOklch


Top-Werkzeuge

BoardlyLinksyChromoCodeHub

ReadyTools

KarriereKontaktWerkzeuge
Preise7 Tage gratis
AnleitungenDocsBlogUpdatesLaraVault

Sprache wählen

Thema wählen

© 2026 ReadyTools. Alle Rechte vorbehalten.