HSL to HEX: #9F1239
Also known as: Tailwind v3 rose-800
Result
hsl(343.40 79.66% 34.71%) → #9F1239
Values are shown at full precision, so converting back gives exactly #9f1239. 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. input
H = 343.40°, S = 79.66%, L = 34.71%
2. C
C = (1 − |2L − 1|) × S = 0.55300
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.15300 (H / 60° = 5.7233, sector 5)
4. m
m = L − C / 2 = 0.07060
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.55300, 0.00000, 0.15300) R = round((0.55300 + 0.07060) × 255) = 159 G = round((0.00000 + 0.07060) × 255) = 18 B = round((0.15300 + 0.07060) × 255) = 57
6. RGB → HEX
#9F1239
All formats
- HEX
- #9f1239
- RGB
- rgb(159 18 57)
- RGB (legacy)
- rgb(159, 18, 57)
- HSL
- hsl(343.40 79.66% 34.71%) → hsl(343 80% 35%)
- HWB
- hwb(343 7% 38%)
- OKLCH
- oklch(0.455 0.171 13.7) · oklch(45.5% 0.171 13.7)
- OKLab
- oklab(0.455 0.166 0.041)
- Lab (D50)
- lab(34.79 55.45 18.07)
- LCH (D50)
- lch(34.79 58.32 18.05)
- Display P3
- color(display-p3 0.5714 0.1398 0.2310)
- Linear sRGB
- color(srgb-linear 0.3467 0.0060 0.0409)
Gamut: sRGB and Display P3
#9F1239 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.182 and Display P3 reaches 0.205; this color uses 94% of the sRGB chroma available.
CSS snippets
.element {
color: #9f1239;
color: rgb(159 18 57);
color: hsl(343 80% 35%);
color: oklch(0.455 0.171 13.7);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.455 0.171 13.7);
}
/* arbitrary values */
class="text-[#9f1239] bg-[oklch(0.455_0.171_13.7)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.5714 0.1398 0.2310); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #9f1239 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- rose-800#A50036
- v3 pink-800#9D174D
- pink-800#A3004C
- v3 red-800#991B1B
- red-800#9F0712
- brown#A52A2A
- rose-900#8B0836
- v3 rose-900#881337
Lighter and darker, same hue and chroma
- #B42C49 · oklch(0.515 0.171 13.7) · ΔL +0.06
- #8A0029 · oklch(0.395 0.171 13.7) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?