Convert OKLCH to RGB
Converting Lightness, Chroma, Hue (perceptual) (OKLCH) to Red, Green, Blue (RGB) is a precise, rule-based operation — both formats describe the same color with different numbers. Whether you are tuning a CSS custom property, matching a brand color across design tools, or preparing values for print, this page gives you an interactive converter, the exact OKLCH → RGB method, a worked example, a quick-reference table and the details that matter (rounding, gamut and print caveats).
From
To
—
—
—
Live preview
How to convert OKLCH to RGB
Take this real example — the color firebrick(#c2410c):
oklch(0.553 0.174 38.4) → rgb(194, 65, 12)
- Rebuild a and b from chroma and hue: a = C·cos(H), b = C·sin(H).
- Undo OKLab: multiply by the OKLab→LMS matrix, cube each component, then multiply by the LMS→XYZ matrix and finally XYZ→linear sRGB.
- Apply the CSS Color 4 gamut-mapping step: if the color falls outside sRGB, reduce chroma (binary search) until it fits, then re-apply the sRGB transfer function.
LCH → OKLab → LMS → cbrt⁻¹ → XYZ → linear sRGB → sRGB (+ gamut mapping)
OKLCH to RGB conversion table
| Color | OKLCH | RGB |
|---|---|---|
| White | oklch(1 0 90) | rgb(255, 255, 255) |
| Black | oklch(0 0 0) | rgb(0, 0, 0) |
| Red | oklch(0.628 0.258 29.23) | rgb(255, 0, 0) |
| Lime | oklch(0.866 0.295 142.5) | rgb(0, 255, 0) |
| Blue | oklch(0.452 0.313 264.05) | rgb(0, 0, 255) |
| VersatilBox accent | oklch(0.553 0.174 38.4) | rgb(194, 65, 12) |
| Tailwind blue-500 | oklch(0.623 0.188 259.81) | rgb(59, 130, 246) |
| Tailwind emerald-500 | oklch(0.696 0.149 162.48) | rgb(16, 185, 129) |
About these formats
OKLCH (Lightness, Chroma, Hue (perceptual)). OKLCH is the modern perceptual space from CSS Color 4: L for lightness, C for chroma (intensity) and H for hue, designed so that equal numeric steps look like equal steps to your eye.
RGB (Red, Green, Blue). RGB is the additive model screens use: every color is a mix of red, green and blue light from 0 to 255 per channel. It is the numeric base all on-screen conversions pass through.
Frequently asked questions
How do I convert OKLCH to RGB?
Rebuild a and b from chroma and hue: a = C·cos(H), b = C·sin(H). Undo OKLab: multiply by the OKLab→LMS matrix, cube each component, then multiply by the LMS→XYZ matrix and finally XYZ→linear sRGB. Apply the CSS Color 4 gamut-mapping step: if the color falls outside sRGB, reduce chroma (binary search) until it fits, then re-apply the sRGB transfer function. The converter above does it instantly, including the reverse direction.
What is OKLCH?
OKLCH — Lightness, Chroma, Hue (perceptual) — is the modern perceptual space from CSS Color 4: L for lightness, C for chroma (intensity) and H for hue, designed so that equal numeric steps look like equal steps to your eye.
What is RGB used for?
RGB (Red, Green, Blue) is the additive model screens use: every color is a mix of red, green and blue light from 0 to 255 per channel. It is the numeric base all on-screen conversions pass through.
Is the OKLCH → RGB conversion exact?
Yes, within display precision. OKLCH values are typically stored to 3 decimals, and on very saturated colors that can shift a channel by 1–3 units of 255 after a round trip — invisible in practice, and exactly how browsers and conversion tools round.
Why does the RGB value look different in other tools?
Small differences come from rounding (how many decimals are kept) and from out-of-gamut handling. This site follows the CSS Color 4 algorithms and shows OKLCH with 3 decimals, the same convention used by browsers and mainstream design tools.