HEX to OKLCH: #831843
Also known as: Tailwind v3 pink-900
Result
#831843 → oklch(0.408 0.144 2.4)
Values are shown at full precision, so converting back gives exactly #831843. 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: 131/255 = 0.51373 → 0.226966 (((x + 0.055) / 1.055)^2.4) G: 24/255 = 0.09412 → 0.009134 (((x + 0.055) / 1.055)^2.4) B: 67/255 = 0.26275 → 0.056128 (((x + 0.055) / 1.055)^2.4)
2. linear sRGB → LMS
l = 0.4122·R + 0.5363·G + 0.0514·B = 0.101347 m = 0.2119·R + 0.6807·G + 0.1074·B = 0.060340 s = 0.0883·R + 0.2817·G + 0.6300·B = 0.057975
3. cube root
l′ = ∛0.101347 = 0.466233 m′ = ∛0.060340 = 0.392226 s′ = ∛0.057975 = 0.387031
4. LMS′ → Oklab
L = 0.2105·l′ + 0.7936·m′ − 0.0041·s′ = 0.40782 a = 1.9780·l′ − 2.4286·m′ + 0.4506·s′ = 0.14405 b = 0.0259·l′ + 0.7828·m′ − 0.8087·s′ = 0.00612
5. Oklab → OKLCH
C = √(a² + b²) = 0.14418 H = atan2(b, a) = 2.432° L = 0.40782
6. OKLCH
oklch(0.40782 0.14418 2.432) rounded: oklch(0.408 0.144 2.4)
All formats
- HEX
- #831843
- RGB
- rgb(131 24 67)
- RGB (legacy)
- rgb(131, 24, 67)
- HSL
- hsl(335.89 69.03% 30.39%) → hsl(336 69% 30%)
- HWB
- hwb(336 9% 49%)
- OKLCH
- oklch(0.408 0.144 2.4) · oklch(40.8% 0.144 2.4)
- OKLab
- oklab(0.408 0.144 0.006)
- Lab (D50)
- lab(29.53 46.64 3.14)
- LCH (D50)
- lch(29.53 46.75 3.85)
- Display P3
- color(display-p3 0.4711 0.1351 0.2616)
- Linear sRGB
- color(srgb-linear 0.2270 0.0091 0.0561)
Gamut: sRGB and Display P3
#831843 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.165 and Display P3 reaches 0.185; this color uses 88% of the sRGB chroma available.
CSS snippets
.element {
color: #831843;
color: rgb(131 24 67);
color: hsl(336 69% 30%);
color: oklch(0.408 0.144 2.4);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.408 0.144 2.4);
}
/* arbitrary values */
class="text-[#831843] bg-[oklch(0.408_0.144_2.4)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.4711 0.1351 0.2616); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #831843 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- pink-900#861043
- v3 rose-900#881337
- rose-900#8B0836
- v3 pink-800#9D174D
- v3 red-900#7F1D1D
- red-900#82181A
- v3 rose-800#9F1239
- pink-800#A3004C
Lighter and darker, same hue and chroma
- #972D53 · oklch(0.468 0.144 2.4) · ΔL +0.06
- #6F0033 · oklch(0.348 0.144 2.4) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?