HEX to HSL: #9F0712
Also known as: Tailwind red-800
Result
#9F0712 → hsl(356 92% 33%)
Values are shown at full precision, so converting back gives exactly #9f0712. 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. RGB ÷ 255
R = 0.6235 G = 0.0275 B = 0.0706
2. max, min, Δ
max = 0.6235 min = 0.0275 Δ = max − min = 0.5961
3. L
L = (max + min) / 2 = 0.3255 = 32.55%
4. S
S = Δ / (1 − |2L − 1|) = 0.9157 = 91.57%
5. H
max is R → H = 60° × (((G − B) / Δ) mod 6) = 60° × (((0.0275 − 0.0706) / 0.5961) mod 6) = 355.66°
6. HSL
hsl(355.66 91.57% 32.55%)
All formats
- HEX
- #9f0712
- RGB
- rgb(159 7 18)
- RGB (legacy)
- rgb(159, 7, 18)
- HSL
- hsl(355.66 91.57% 32.55%) → hsl(356 92% 33%)
- HWB
- hwb(356 3% 38%)
- OKLCH
- oklch(0.445 0.177 26.8) · oklch(44.5% 0.177 26.8)
- OKLab
- oklab(0.445 0.158 0.080)
- Lab (D50)
- lab(33.78 56.04 40.90)
- LCH (D50)
- lch(33.78 69.38 36.12)
- Display P3
- color(display-p3 0.5708 0.1208 0.1096)
- Linear sRGB
- color(srgb-linear 0.3467 0.0021 0.0060)
Gamut: sRGB and Display P3
#9F0712 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.181 and Display P3 reaches 0.204; this color uses 98% of the sRGB chroma available.
CSS snippets
.element {
color: #9f0712;
color: rgb(159 7 18);
color: hsl(356 92% 33%);
color: oklch(0.445 0.177 26.8);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.445 0.177 26.8);
}
/* arbitrary values */
class="text-[#9f0712] bg-[oklch(0.445_0.177_26.8)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.5708 0.1208 0.1096); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #9f0712 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 red-800#991B1B
- brown#A52A2A
- v3 rose-800#9F1239
- rose-800#A50036
- orange-800#9F2D00
- darkred#8B0000
- v3 orange-800#9A3412
- firebrick#B22222
Lighter and darker, same hue and chroma
- #B42726 · oklch(0.505 0.177 26.8) · ΔL +0.06
- #8A0000 · oklch(0.385 0.177 26.8) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?