HEX to OKLCH: #22C55E
Also known as: Tailwind v3 green-500
Result
#22C55E → oklch(0.723 0.192 149.6)
Values are shown at full precision, so converting back gives exactly #22c55e. The rounded form is what you normally paste into CSS.
Step-by-step math
Every number below is computed from the input, nothing is looked up.
1. sRGB → linear
R: 34/255 = 0.13333 → 0.015996 (((x + 0.055) / 1.055)^2.4) G: 197/255 = 0.77255 → 0.558340 (((x + 0.055) / 1.055)^2.4) B: 94/255 = 0.36863 → 0.111932 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.311809 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.395473 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.229223
3. cube root
l′ = ∛0.311809 = 0.678104 m′ = ∛0.395473 = 0.734016 s′ = ∛0.229223 = 0.612001
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.72275 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.16557 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.09722
5. Oklab → OKLCH
C = √(a² + b²) = 0.19201 H = atan2(b, a) = 149.579° L = 0.72275
6. OKLCH
oklch(0.72275 0.19201 149.579) rounded: oklch(0.723 0.192 149.6)
All formats
- HEX
- #22c55e
- RGB
- rgb(34 197 94)
- RGB (legacy)
- rgb(34, 197, 94)
- HSL
- hsl(142.09 70.56% 45.29%) → hsl(142 71% 45%)
- HWB
- hwb(142 13% 23%)
- OKLCH
- oklch(0.723 0.192 149.6) · oklch(72.3% 0.192 149.6)
- OKLab
- oklab(0.723 -0.166 0.097)
- Lab (D50)
- lab(70.22 -57.98 39.44)
- LCH (D50)
- lch(70.22 70.12 145.78)
- Display P3
- color(display-p3 0.3692 0.7613 0.4136)
- Linear sRGB
- color(srgb-linear 0.0160 0.5583 0.1119)
Gamut: sRGB and Display P3
#22C55E is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.201 and Display P3 reaches 0.281; this color uses 95% of the sRGB chroma available.
CSS snippets
.element {
color: #22c55e;
color: rgb(34 197 94);
color: hsl(142 71% 45%);
color: oklch(0.723 0.192 149.6);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.723 0.192 149.6);
}
/* arbitrary values */
class="text-[#22c55e] bg-[oklch(0.723_0.192_149.6)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.3692 0.7613 0.4136); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #22c55e calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- green-500#00C950
- limegreen#32CD32
- emerald-500#00BC7D
- v3 emerald-500#10B981
- mediumseagreen#3CB371
- emerald-400#00D492
- green-400#05DF72
- v3 emerald-400#34D399
Lighter and darker, same hue and chroma
- #41D971 · oklch(0.783 0.192 149.6) · ΔL +0.06
- #00B14B · oklch(0.663 0.192 149.6) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?