HEX to OKLCH: #422006
Also known as: Tailwind v3 yellow-950
Result
#422006 → oklch(0.286 0.064 53.8)
Values are shown at full precision, so converting back gives exactly #422006. 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: 66/255 = 0.25882 → 0.054480 (((x + 0.055) / 1.055)^2.4) G: 32/255 = 0.12549 → 0.014444 (((x + 0.055) / 1.055)^2.4) B: 6/255 = 0.02353 → 0.001821 (÷ 12.92)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.030298 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.021572 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.010027
3. cube root
l′ = ∛0.030298 = 0.311750 m′ = ∛0.021572 = 0.278375 s′ = ∛0.010027 = 0.215638
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.28565 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.03775 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.05160
5. Oklab → OKLCH
C = √(a² + b²) = 0.06393 H = atan2(b, a) = 53.813° L = 0.28565
6. OKLCH
oklch(0.28565 0.06393 53.813) rounded: oklch(0.286 0.064 53.8)
All formats
- HEX
- #422006
- RGB
- rgb(66 32 6)
- RGB (legacy)
- rgb(66, 32, 6)
- HSL
- hsl(26.00 83.33% 14.12%) → hsl(26 83% 14%)
- HWB
- hwb(26 2% 74%)
- OKLCH
- oklch(0.286 0.064 53.8) · oklch(28.6% 0.064 53.8)
- OKLab
- oklab(0.286 0.038 0.052)
- Lab (D50)
- lab(16.79 15.18 22.41)
- LCH (D50)
- lch(16.79 27.07 55.89)
- Display P3
- color(display-p3 0.2411 0.1322 0.0466)
- Linear sRGB
- color(srgb-linear 0.0545 0.0144 0.0018)
Gamut: sRGB and Display P3
#422006 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.072 and Display P3 reaches 0.082; this color uses 89% of the sRGB chroma available.
CSS snippets
.element {
color: #422006;
color: rgb(66 32 6);
color: hsl(26 83% 14%);
color: oklch(0.286 0.064 53.8);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.286 0.064 53.8);
}
/* arbitrary values */
class="text-[#422006] bg-[oklch(0.286_0.064_53.8)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2411 0.1322 0.0466); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #422006 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- yellow-950#432004
- v3 amber-950#451A03
- amber-950#461901
- v3 orange-950#431407
- orange-950#441306
- v3 red-950#450A0A
- red-950#460809
- olive-800#2B2B22
Lighter and darker, same hue and chroma
- #532F16 · oklch(0.346 0.064 53.8) · ΔL +0.06
- #321100 · oklch(0.226 0.064 53.8) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?