HSL to HEX: #FEF08A
Also known as: Tailwind v3 yellow-200
Result
hsl(52.76 98.31% 76.86%) → #FEF08A
Values are shown at full precision, so converting back gives exactly #fef08a. 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 = 52.76°, S = 98.31%, L = 76.86%
2. C
C = (1 − |2L − 1|) × S = 0.45498
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.40008 (H / 60° = 0.8793, sector 0)
4. m
m = L − C / 2 = 0.54111
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.45498, 0.40008, 0.00000) R = round((0.45498 + 0.54111) × 255) = 254 G = round((0.40008 + 0.54111) × 255) = 240 B = round((0.00000 + 0.54111) × 255) = 138
6. RGB → HEX
#FEF08A
All formats
- HEX
- #fef08a
- RGB
- rgb(254 240 138)
- RGB (legacy)
- rgb(254, 240, 138)
- HSL
- hsl(52.76 98.31% 76.86%) → hsl(53 98% 77%)
- HWB
- hwb(53 54% 0%)
- OKLCH
- oklch(0.945 0.124 101.5) · oklch(94.5% 0.124 101.5)
- OKLab
- oklab(0.945 -0.025 0.122)
- Lab (D50)
- lab(94.34 -4.96 50.75)
- LCH (D50)
- lch(94.34 51.00 95.58)
- Display P3
- color(display-p3 0.9866 0.9431 0.5939)
- Linear sRGB
- color(srgb-linear 0.9911 0.8714 0.2542)
Gamut: sRGB and Display P3
#FEF08A is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.131 and Display P3 reaches 0.152; this color uses 95% of the sRGB chroma available.
CSS snippets
.element {
color: #fef08a;
color: rgb(254 240 138);
color: hsl(53 98% 77%);
color: oklch(0.945 0.124 101.5);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.945 0.124 101.5);
}
/* arbitrary values */
class="text-[#fef08a] bg-[oklch(0.945_0.124_101.5)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.9866 0.9431 0.5939); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #fef08a calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- yellow-200#FFF085
- amber-200#FEE685
- v3 amber-200#FDE68A
- khaki#F0E68C
- v3 lime-200#D9F99D
- lime-200#D8F999
- palegoldenrod#EEE8AA
- v3 yellow-300#FDE047
Lighter and darker, same hue and chroma
- #FFFF9C · oklch(1.000 0.124 101.5) · ΔL +0.06
- #EADC76 · oklch(0.885 0.124 101.5) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?