HEX to OKLCH: #9A3412
Also known as: Tailwind v3 orange-800
Result
#9A3412 → oklch(0.470 0.143 37.3)
Values are shown at full precision, so converting back gives exactly #9a3412. 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: 154/255 = 0.60392 → 0.323143 (((x + 0.055) / 1.055)^2.4) G: 52/255 = 0.20392 → 0.034340 (((x + 0.055) / 1.055)^2.4) B: 18/255 = 0.07059 → 0.006049 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.151935 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.092500 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.042019
3. cube root
l′ = ∛0.151935 = 0.533605 m′ = ∛0.092500 = 0.452252 s′ = ∛0.042019 = 0.347655
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.46980 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.11379 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.08669
5. Oklab → OKLCH
C = √(a² + b²) = 0.14305 H = atan2(b, a) = 37.304° L = 0.46980
6. OKLCH
oklch(0.46980 0.14305 37.304) rounded: oklch(0.470 0.143 37.3)
All formats
- HEX
- #9a3412
- RGB
- rgb(154 52 18)
- RGB (legacy)
- rgb(154, 52, 18)
- HSL
- hsl(15.00 79.07% 33.73%) → hsl(15 79% 34%)
- HWB
- hwb(15 7% 40%)
- OKLCH
- oklch(0.470 0.143 37.3) · oklch(47.0% 0.143 37.3)
- OKLab
- oklab(0.470 0.114 0.087)
- Lab (D50)
- lab(37.28 42.22 42.83)
- LCH (D50)
- lch(37.28 60.14 45.41)
- Display P3
- color(display-p3 0.5582 0.2319 0.1206)
- Linear sRGB
- color(srgb-linear 0.3231 0.0343 0.0060)
Gamut: sRGB and Display P3
#9A3412 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.156 and Display P3 reaches 0.176; this color uses 92% of the sRGB chroma available.
CSS snippets
.element {
color: #9a3412;
color: rgb(154 52 18);
color: hsl(15 79% 34%);
color: oklch(0.470 0.143 37.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.470 0.143 37.3);
}
/* arbitrary values */
class="text-[#9a3412] bg-[oklch(0.470_0.143_37.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.5582 0.2319 0.1206); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #9a3412 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- orange-800#9F2D00
- amber-800#973C00
- v3 amber-800#92400E
- brown#A52A2A
- v3 red-800#991B1B
- saddlebrown#8B4513
- red-800#9F0712
- firebrick#B22222
Lighter and darker, same hue and chroma
- #AE4727 · oklch(0.530 0.143 37.3) · ΔL +0.06
- #862000 · oklch(0.410 0.143 37.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?