HSL to HEX: #7F1D1D
Also known as: Tailwind v3 red-900
Result
hsl(0.00 62.82% 30.59%) → #7F1D1D
Values are shown at full precision, so converting back gives exactly #7f1d1d. 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 = 0.00°, S = 62.82%, L = 30.59%
2. C
C = (1 − |2L − 1|) × S = 0.38433
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.00000 (H / 60° = 0.0000, sector 0)
4. m
m = L − C / 2 = 0.11373
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.38433, 0.00000, 0.00000) R = round((0.38433 + 0.11373) × 255) = 127 G = round((0.00000 + 0.11373) × 255) = 29 B = round((0.00000 + 0.11373) × 255) = 29
6. RGB → HEX
#7F1D1D
All formats
- HEX
- #7f1d1d
- RGB
- rgb(127 29 29)
- RGB (legacy)
- rgb(127, 29, 29)
- HSL
- hsl(0.00 62.82% 30.59%) → hsl(0 63% 31%)
- HWB
- hwb(0 11% 50%)
- OKLCH
- oklch(0.396 0.133 25.7) · oklch(39.6% 0.133 25.7)
- OKLab
- oklab(0.396 0.120 0.058)
- Lab (D50)
- lab(28.58 41.98 26.83)
- LCH (D50)
- lch(28.58 49.82 32.58)
- Display P3
- color(display-p3 0.4574 0.1470 0.1319)
- Linear sRGB
- color(srgb-linear 0.2122 0.0123 0.0123)
Gamut: sRGB and Display P3
#7F1D1D is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.161 and Display P3 reaches 0.181; this color uses 83% of the sRGB chroma available.
CSS snippets
.element {
color: #7f1d1d;
color: rgb(127 29 29);
color: hsl(0 63% 31%);
color: oklch(0.396 0.133 25.7);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.396 0.133 25.7);
}
/* arbitrary values */
class="text-[#7f1d1d] bg-[oklch(0.396_0.133_25.7)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.4574 0.1470 0.1319); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #7f1d1d calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- red-900#82181A
- maroon#800000
- orange-900#7E2A0C
- darkred#8B0000
- v3 orange-900#7C2D12
- v3 rose-900#881337
- rose-900#8B0836
- amber-900#7B3306
Lighter and darker, same hue and chroma
- #93302D · oklch(0.456 0.133 25.7) · ΔL +0.06
- #6C040C · oklch(0.336 0.133 25.7) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?