HEX to RGB: #9F1239
Also known as: Tailwind v3 rose-800
Result
#9F1239 → rgb(159 18 57)
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. HEX → pairs
#9F1239 → 9F | 12 | 39
2. base 16 → base 10
R = 9F₁₆ = 9×16 + 15 = 159 G = 12₁₆ = 1×16 + 2 = 18 B = 39₁₆ = 3×16 + 9 = 57
3. RGB
rgb(159 18 57)
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?