HSL to HEX: #7C2D12
Also known as: Tailwind v3 orange-900
Result
hsl(15.28 74.65% 27.84%) → #7C2D12
Values are shown at full precision, so converting back gives exactly #7c2d12. 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 = 15.28°, S = 74.65%, L = 27.84%
2. C
C = (1 − |2L − 1|) × S = 0.41565
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.10585 (H / 60° = 0.2547, sector 0)
4. m
m = L − C / 2 = 0.07057
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.41565, 0.10585, 0.00000) R = round((0.41565 + 0.07057) × 255) = 124 G = round((0.10585 + 0.07057) × 255) = 45 B = round((0.00000 + 0.07057) × 255) = 18
6. RGB → HEX
#7C2D12
All formats
- HEX
- #7c2d12
- RGB
- rgb(124 45 18)
- RGB (legacy)
- rgb(124, 45, 18)
- HSL
- hsl(15.28 74.65% 27.84%) → hsl(15 75% 28%)
- HWB
- hwb(15 7% 51%)
- OKLCH
- oklch(0.408 0.116 38.2) · oklch(40.8% 0.116 38.2)
- OKLab
- oklab(0.408 0.092 0.072)
- Lab (D50)
- lab(30.41 33.99 34.58)
- LCH (D50)
- lch(30.41 48.49 45.49)
- Display P3
- color(display-p3 0.4497 0.1966 0.1052)
- Linear sRGB
- color(srgb-linear 0.2016 0.0262 0.0060)
Gamut: sRGB and Display P3
#7C2D12 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.133 and Display P3 reaches 0.150; this color uses 87% of the sRGB chroma available.
CSS snippets
.element {
color: #7c2d12;
color: rgb(124 45 18);
color: hsl(15 75% 28%);
color: oklch(0.408 0.116 38.2);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.408 0.116 38.2);
}
/* arbitrary values */
class="text-[#7c2d12] bg-[oklch(0.408_0.116_38.2)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.4497 0.1966 0.1052); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #7c2d12 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- orange-900#7E2A0C
- amber-900#7B3306
- v3 amber-900#78350F
- v3 red-900#7F1D1D
- red-900#82181A
- yellow-900#733E0A
- v3 yellow-900#713F12
- darkred#8B0000
Lighter and darker, same hue and chroma
- #8F3F25 · oklch(0.468 0.116 38.2) · ΔL +0.06
- #691B00 · oklch(0.348 0.116 38.2) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?