HEX to HSL: #4D0218
Also known as: Tailwind rose-950
Result
#4D0218 → hsl(342 95% 15%)
Values are shown at full precision, so converting back gives exactly #4d0218. 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.3020 G = 0.0078 B = 0.0941
2. max, min, Δ
max = 0.3020 min = 0.0078 Δ = max − min = 0.2941
3. L
L = (max + min) / 2 = 0.1549 = 15.49%
4. S
S = Δ / (1 − |2L − 1|) = 0.9494 = 94.94%
5. H
max is R → H = 60° × (((G − B) / Δ) mod 6) = 60° × (((0.0078 − 0.0941) / 0.2941) mod 6) = 342.40°
6. HSL
hsl(342.40 94.94% 15.49%)
All formats
- HEX
- #4d0218
- RGB
- rgb(77 2 24)
- RGB (legacy)
- rgb(77, 2, 24)
- HSL
- hsl(342.40 94.94% 15.49%) → hsl(342 95% 15%)
- HWB
- hwb(342 1% 70%)
- OKLCH
- oklch(0.270 0.105 12.3) · oklch(27.0% 0.105 12.3)
- OKLab
- oklab(0.270 0.103 0.022)
- Lab (D50)
- lab(14.12 33.98 9.97)
- LCH (D50)
- lch(14.12 35.42 16.36)
- Display P3
- color(display-p3 0.2743 0.0394 0.0974)
- Linear sRGB
- color(srgb-linear 0.0742 0.0006 0.0091)
Gamut: sRGB and Display P3
#4D0218 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.108 and Display P3 reaches 0.122; this color uses 97% of the sRGB chroma available.
CSS snippets
.element {
color: #4d0218;
color: rgb(77 2 24);
color: hsl(342 95% 15%);
color: oklch(0.270 0.105 12.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.270 0.105 12.3);
}
/* arbitrary values */
class="text-[#4d0218] bg-[oklch(0.270_0.105_12.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.2743 0.0394 0.0974); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #4d0218 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 rose-950#4C0519
- v3 pink-950#500724
- pink-950#510424
- red-950#460809
- v3 red-950#450A0A
- orange-950#441306
- v3 orange-950#431407
- amber-950#461901
Lighter and darker, same hue and chroma
- #5F1626 · oklch(0.330 0.105 12.3) · ΔL +0.06
- #3B000A · oklch(0.210 0.105 12.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?