HEX to HSL: #8B0836
Also known as: Tailwind rose-900
Result
#8B0836 → hsl(339 89% 29%)
Values are shown at full precision, so converting back gives exactly #8b0836. 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.5451 G = 0.0314 B = 0.2118
2. max, min, Δ
max = 0.5451 min = 0.0314 Δ = max − min = 0.5137
3. L
L = (max + min) / 2 = 0.2882 = 28.82%
4. S
S = Δ / (1 − |2L − 1|) = 0.8912 = 89.12%
5. H
max is R → H = 60° × (((G − B) / Δ) mod 6) = 60° × (((0.0314 − 0.2118) / 0.5137) mod 6) = 338.93°
6. HSL
hsl(338.93 89.12% 28.82%)
All formats
- HEX
- #8b0836
- RGB
- rgb(139 8 54)
- RGB (legacy)
- rgb(139, 8, 54)
- HSL
- hsl(338.93 89.12% 28.82%) → hsl(339 89% 29%)
- HWB
- hwb(339 3% 45%)
- OKLCH
- oklch(0.411 0.159 10.2) · oklch(41.1% 0.159 10.2)
- OKLab
- oklab(0.411 0.156 0.028)
- Lab (D50)
- lab(29.77 51.52 12.53)
- LCH (D50)
- lch(29.77 53.02 13.67)
- Display P3
- color(display-p3 0.4986 0.1056 0.2156)
- Linear sRGB
- color(srgb-linear 0.2582 0.0024 0.0369)
Gamut: sRGB and Display P3
#8B0836 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.164 and Display P3 reaches 0.185; this color uses 97% of the sRGB chroma available.
CSS snippets
.element {
color: #8b0836;
color: rgb(139 8 54);
color: hsl(339 89% 29%);
color: oklch(0.411 0.159 10.2);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.411 0.159 10.2);
}
/* arbitrary values */
class="text-[#8b0836] bg-[oklch(0.411_0.159_10.2)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.4986 0.1056 0.2156); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #8b0836 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 rose-900#881337
- pink-900#861043
- v3 pink-900#831843
- red-900#82181A
- v3 rose-800#9F1239
- v3 red-900#7F1D1D
- v3 pink-800#9D174D
- darkred#8B0000
Lighter and darker, same hue and chroma
- #9F2446 · oklch(0.471 0.159 10.2) · ΔL +0.06
- #770027 · oklch(0.351 0.159 10.2) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?