Convert color from OKLCH to RGB

OKLCH to RGB converter

Convert oklch() to rgb() channel values.

Example: oklch(70.45% 0.1926 39.23)

RGB
See this color in all formats

About OKLCH to RGB Converter

Canvas, WebGL, image processing and many JavaScript libraries only take sRGB channel values. Converting from OKLCH is how you bring a color from a modern design token or CSS file into that world.

About the formats. OKLCH is a perceptual color model built on Björn Ottosson's OKLab space: L is lightness from 0% to 100%, C is chroma (how vivid the color is, from 0 for grey up to about 0.32 inside sRGB) and H is the hue angle in degrees. Lightness tracks what the eye sees, so equal L values look equally light. RGB gives the amount of red, green and blue light as three numbers from 0 to 255, as in rgb(255, 107, 53). Both the comma form and the space form rgb(255 107 53 / 50%) are read, and percentages work too.

How exact is it? OKLCH can describe colors that a standard screen cannot show. When the color is outside sRGB, its chroma is lowered, keeping lightness and hue, until it fits, which is how browsers handle it too; colors already inside sRGB convert unchanged. The channels come out as whole numbers from 0 to 255, and a partly transparent color is written as rgba().

For example, oklch(91.37% 0.1725 99.81) in OKLCH is rgb(254, 228, 64) in RGB. The path is OKLCH to OKLab, to linear light, to gamma-encoded sRGB, then rounding to whole 0 to 255 numbers. Values that would fall outside 0 to 255 are not clipped channel by channel. Chroma is reduced instead, which keeps the hue true.

How to convert OKLCH to RGB

  1. Type or paste an OKLCH color, such as oklch(91.37% 0.1725 99.81), or choose a color with the picker.
  2. The RGB value, rgb(254, 228, 64) for that example, appears straight away.
  3. Press Copy to put the RGB value on your clipboard.
  4. Use the From and To menus at the top to switch to a different conversion, or open the all-formats page to see every format at once.

Frequently asked questions

How do I convert OKLCH to RGB?

Type or paste an OKLCH value such as oklch(91.37% 0.1725 99.81) and the RGB value, rgb(254, 228, 64), appears straight away. Use Copy to put it on your clipboard, or choose a color with the picker.

Why isn't the rgb() an exact match for my oklch color?

Only when the OKLCH color is outside sRGB. Screens use sRGB here, so the closest color that fits is returned, and a note under the input tells you so. Colors inside sRGB convert exactly, apart from rounding to whole numbers.

How do I write the hue?

As an angle in degrees from 0 to 360, or with a unit such as deg or turn. Red sits near 29, green near 142 and blue near 264.

Is converting OKLCH to RGB exact?

OKLCH can describe colors that a standard screen cannot show. When the color is outside sRGB, its chroma is lowered, keeping lightness and hue, until it fits, which is how browsers handle it too; colors already inside sRGB convert unchanged. The channels come out as whole numbers from 0 to 255, and a partly transparent color is written as rgba().

Does OKLCH to RGB keep transparency?

Yes. Add transparency to the OKLCH value and it is carried over to the RGB result, which supports it too.

Are my colors sent anywhere?

No. The conversion runs in your browser and nothing is uploaded.