HEX to HSL: #FEF9C2
Also known as: Tailwind yellow-100
Result
#FEF9C2 → hsl(55 97% 88%)
Values are shown at full precision, so converting back gives exactly #fef9c2. 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.9961 G = 0.9765 B = 0.7608
2. max, min, Δ
max = 0.9961 min = 0.7608 Δ = max − min = 0.2353
3. L
L = (max + min) / 2 = 0.8784 = 87.84%
4. S
S = Δ / (1 − |2L − 1|) = 0.9677 = 96.77%
5. H
max is R → H = 60° × (((G − B) / Δ) mod 6) = 60° × (((0.9765 − 0.7608) / 0.2353) mod 6) = 55.00°
6. HSL
hsl(55.00 96.77% 87.84%)
All formats
- HEX
- #fef9c2
- RGB
- rgb(254 249 194)
- RGB (legacy)
- rgb(254, 249, 194)
- HSL
- hsl(55.00 96.77% 87.84%) → hsl(55 97% 88%)
- HWB
- hwb(55 76% 0%)
- OKLCH
- oklch(0.973 0.071 103.3) · oklch(97.3% 0.071 103.3)
- OKLab
- oklab(0.973 -0.016 0.069)
- Lab (D50)
- lab(97.32 -4.54 27.16)
- LCH (D50)
- lch(97.32 27.53 99.48)
- Display P3
- color(display-p3 0.9926 0.9771 0.7838)
- Linear sRGB
- color(srgb-linear 0.9911 0.9473 0.5395)
Gamut: sRGB and Display P3
#FEF9C2 is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.079 and Display P3 reaches 0.088; this color uses 90% of the sRGB chroma available.
CSS snippets
.element {
color: #fef9c2;
color: rgb(254 249 194);
color: hsl(55 97% 88%);
color: oklch(0.973 0.071 103.3);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.973 0.071 103.3);
}
/* arbitrary values */
class="text-[#fef9c2] bg-[oklch(0.973_0.071_103.3)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.9926 0.9771 0.7838); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #fef9c2 calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 yellow-100#FEF9C3
- lemonchiffon#FFFACD
- amber-100#FEF3C6
- v3 amber-100#FEF3C7
- lightgoldenrodyellow#FAFAD2
- lime-100#ECFCCA
- v3 lime-100#ECFCCB
- cornsilk#FFF8DC
Lighter and darker, same hue and chroma
- #FFFFCB · oklch(1.000 0.071 103.3) · ΔL +0.06
- #EAE5AF · oklch(0.913 0.071 103.3) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?