RGB to OKLCH Converter
Paste an RGB value and get the exact OKLCH equivalent instantly — plus every other color format, a gamut check and one-click copy.
Gamut: srgb
Common RGB → OKLCH values
| Vivid Indigo | rgb(99 102 241) | oklch(0.5854 0.2041 277.12) | Details |
| Vivid Red | rgb(239 68 68) | oklch(0.6368 0.2078 25.33) | Details |
| Orange | rgb(249 115 22) | oklch(0.7049 0.1867 47.6) | Details |
| Light Yellow | rgb(234 179 8) | oklch(0.7952 0.1617 86.05) | Details |
| Vivid Green | rgb(34 197 94) | oklch(0.7227 0.192 149.58) | Details |
| Teal | rgb(20 184 166) | oklch(0.7038 0.123 182.5) | Details |
| Sky Blue | rgb(14 165 233) | oklch(0.6847 0.1479 237.32) | Details |
| Blue | rgb(59 130 246) | oklch(0.6231 0.188 259.81) | Details |
| Vivid Violet | rgb(139 92 246) | oklch(0.6056 0.2189 292.72) | Details |
| Vivid Pink | rgb(236 72 153) | oklch(0.6559 0.2118 354.31) | Details |
| Medium Gray | rgb(120 113 108) | oklch(0.5534 0.0116 58.07) | Details |
| Black | rgb(0 0 0) | oklch(0 0 0) | Details |
From three channels to three meanings
RGB describes a color by how much red, green and blue light to mix, which says little about how it looks. OKLCH describes the same color by lightness, chroma and hue, so making it lighter, more muted or a different hue is a change to one number.
Using the result in CSS
Paste the oklch() value wherever you used rgb(). Alpha carries over the same way:
.overlay {
background: rgb(99 102 241 / 0.5);
background: oklch(0.5854 0.2041 277.12 / 0.5);
}Going beyond sRGB
RGB values from rgb() are limited to sRGB. Once a color is in OKLCH you can raise its chroma past that limit for wide-gamut Display-P3 screens, and browsers on sRGB screens map it back automatically.
Frequently asked questions
- How do you convert RGB to OKLCH?
- Scale each channel to 0–1 and undo the sRGB gamma curve to get linear light. A fixed matrix and a cube root turn that into OKLab, and OKLab's a and b axes become chroma (distance from gray) and hue (angle) in OKLCH.
- Is RGB to OKLCH lossless?
- Yes. Every sRGB color has an exact OKLCH equivalent, so converting back gives the same RGB values, give or take rounding to whole numbers.
- Why is the chroma of gray 0?
- Chroma measures how far a color is from neutral. When R, G and B are equal the color has no tint, so chroma is 0 and the hue is undefined; it is written as 0 by convention.