HSL to HEX: #EAB308
Also known as: Tailwind v3 yellow-500
Result
hsl(45.40 93.39% 47.45%) → #EAB308
Values are shown at full precision, so converting back gives exactly #eab308. 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 = 45.40°, S = 93.39%, L = 47.45%
2. C
C = (1 − |2L − 1|) × S = 0.88627
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.67061 (H / 60° = 0.7567, sector 0)
4. m
m = L − C / 2 = 0.03136
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.88627, 0.67061, 0.00000) R = round((0.88627 + 0.03136) × 255) = 234 G = round((0.67061 + 0.03136) × 255) = 179 B = round((0.00000 + 0.03136) × 255) = 8
6. RGB → HEX
#EAB308
All formats
- HEX
- #eab308
- RGB
- rgb(234 179 8)
- RGB (legacy)
- rgb(234, 179, 8)
- HSL
- hsl(45.40 93.39% 47.45%) → hsl(45 93% 47%)
- HWB
- hwb(45 3% 8%)
- OKLCH
- oklch(0.795 0.162 86.0) · oklch(79.5% 0.162 86.0)
- OKLab
- oklab(0.795 0.011 0.161)
- Lab (D50)
- lab(76.46 11.75 77.37)
- LCH (D50)
- lch(76.46 78.26 81.37)
- Display P3
- color(display-p3 0.8843 0.7105 0.2450)
- Linear sRGB
- color(srgb-linear 0.8228 0.4508 0.0024)
Gamut: sRGB and Display P3
#EAB308 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.163 and Display P3 reaches 0.188; this color uses 99% of the sRGB chroma available.
CSS snippets
.element {
color: #eab308;
color: rgb(234 179 8);
color: hsl(45 93% 47%);
color: oklch(0.795 0.162 86.0);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.795 0.162 86.0);
}
/* arbitrary values */
class="text-[#eab308] bg-[oklch(0.795_0.162_86.0)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.8843 0.7105 0.2450); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #eab308 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- yellow-500#F0B100
- amber-400#FFB900
- v3 amber-400#FBBF24
- orange#FFA500
- goldenrod#DAA520
- v3 amber-500#F59E0B
- yellow-400#FDC700
- amber-500#FE9A00
Lighter and darker, same hue and chroma
- #FEC734 · oklch(0.855 0.162 86.0) · ΔL +0.06
- #D6A000 · oklch(0.735 0.162 86.0) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?