HSL to HEX: #F0E68C
Also known as: CSS khaki
Result
hsl(54.00 76.92% 74.51%) → #F0E68C
Values are shown at full precision, so converting back gives exactly #f0e68c. 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 = 54.00°, S = 76.92%, L = 74.51%
2. C
C = (1 − |2L − 1|) × S = 0.39214
3. X
X = C × (1 − |(H / 60°) mod 2 − 1|) = 0.35292 (H / 60° = 0.9000, sector 0)
4. m
m = L − C / 2 = 0.54903
5. (R′, G′, B′) + m
(R′, G′, B′) = (0.39214, 0.35292, 0.00000) R = round((0.39214 + 0.54903) × 255) = 240 G = round((0.35292 + 0.54903) × 255) = 230 B = round((0.00000 + 0.54903) × 255) = 140
6. RGB → HEX
#F0E68C
All formats
- HEX
- #f0e68c
- RGB
- rgb(240 230 140)
- RGB (legacy)
- rgb(240, 230, 140)
- HSL
- hsl(54.00 76.92% 74.51%) → hsl(54 77% 75%)
- HWB
- hwb(54 55% 6%)
- OKLCH
- oklch(0.913 0.112 102.8) · oklch(91.3% 0.112 102.8)
- OKLab
- oklab(0.913 -0.025 0.109)
- Lab (D50)
- lab(90.64 -5.60 45.00)
- LCH (D50)
- lch(90.64 45.34 97.09)
- Display P3
- color(display-p3 0.9344 0.9033 0.5935)
- Linear sRGB
- color(srgb-linear 0.8714 0.7913 0.2623)
Gamut: sRGB and Display P3
#F0E68C is a hex color, so it sits inside sRGB and therefore inside Display P3. At this lightness and hue, sRGB reaches chroma 0.192 and Display P3 reaches 0.222; this color uses 58% of the sRGB chroma available.
CSS snippets
.element {
color: #f0e68c;
color: rgb(240 230 140);
color: hsl(54 77% 75%);
color: oklch(0.913 0.112 102.8);
}
/* Tailwind CSS v4 */
@theme {
--color-brand: oklch(0.913 0.112 102.8);
}
/* arbitrary values */
class="text-[#f0e68c] bg-[oklch(0.913_0.112_102.8)]"
/* wide-gamut screens */
@media (color-gamut: p3) {
.element { color: color(display-p3 0.9344 0.9033 0.5935); }
}
/* relative color syntax: 10% darker */
.element-dark { color: oklch(from #f0e68c calc(l - 0.1) c h); }Nearby colors
Closest colors in the Tailwind and CSS named palettes (OKLab distance).
- v3 amber-200#FDE68A
- amber-200#FEE685
- palegoldenrod#EEE8AA
- v3 yellow-200#FEF08A
- yellow-200#FFF085
- v3 lime-200#D9F99D
- lime-200#D8F999
- v3 yellow-300#FDE047
Lighter and darker, same hue and chroma
- #FFFA9F · oklch(0.973 0.112 102.8) · ΔL +0.06
- #DCD279 · oklch(0.853 0.112 102.8) · ΔL −0.06
Open in the studio
Other converters for this color
Guides: What is OKLCH?