HEX to OKLCH: #008236
Also known as: Tailwind green-700
Result
#008236 → oklch(0.530 0.149 149.0)
Values are shown at full precision, so converting back gives exactly #008236. 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: 0/255 = 0.00000 → 0.000000 (÷ 12.92) G: 130/255 = 0.50980 → 0.223228 (((x + 0.055) / 1.055)^2.4) B: 54/255 = 0.21176 → 0.036889 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.121622 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.155913 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.086127
3. cube root
l′ = ∛0.121622 = 0.495455 m′ = ∛0.155913 = 0.538221 s′ = ∛0.086127 = 0.441618
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.52961 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = -0.12812 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.07701
5. Oklab → OKLCH
C = √(a² + b²) = 0.14948 H = atan2(b, a) = 148.990° L = 0.52961
6. OKLCH
oklch(0.52961 0.14948 148.990) rounded: oklch(0.530 0.149 149.0)
All formats
- HEX
- #008236
- RGB
- rgb(0 130 54)
- RGB (legacy)
- rgb(0, 130, 54)
- HSL
- hsl(144.92 100.00% 25.49%) → hsl(145 100% 25%)
- HWB
- hwb(145 0% 49%)
- OKLCH
- oklch(0.530 0.149 149.0) · oklch(53.0% 0.149 149.0)
- OKLab
- oklab(0.530 -0.128 0.077)
- Lab (D50)
- lab(47.27 -44.87 31.58)
- LCH (D50)
- lch(47.27 54.87 144.86)
- Display P3
- color(display-p3 0.2199 0.5019 0.2472)
- Linear sRGB
- color(srgb-linear 0.0000 0.2232 0.0369)
Gamut: sRGB and Display P3
#008236 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.149 and Display P3 reaches 0.209; this color uses 100% of the sRGB chroma available.
CSS snippets
.element {
color: #008236;
color: rgb(0 130 54);
color: hsl(145 100% 25%);
color: oklch(0.530 0.149 149.0);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.530 0.149 149.0);
}
/* arbitrary values */
class="text-[#008236] bg-[oklch(0.530_0.149_149.0)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2199 0.5019 0.2472); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #008236 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 green-700#15803D
- green#008000
- forestgreen#228B22
- lime-700#497D00
- v3 lime-700#4D7C0F
- seagreen#2E8B57
- emerald-700#007A55
- v3 emerald-700#047857
Lighter and darker, same hue and chroma
- #269448 · oklch(0.590 0.149 149.0) · ΔL +0.06
- #007024 · oklch(0.470 0.149 149.0) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?