Skip to content

#fef2aa

a light, electric yellow · cool · closest name: khaki

RGB
254, 242, 170
HSL
51°, 98%, 83%
CMYK
0, 5, 33, 0
Luminance
0.8748

Every format

HEX#fef2aa
RGBrgb(254, 242, 170)
HSLhsl(51, 98%, 83%)
CMYKcmyk(0%, 5%, 33%, 0%)
LABlab(94.9 -6.3 36.3)
LCHlch(94.9 36.8 99.9)
OKLCHoklch(0.954 0.091 99.9)

Copy-ready code

/* CSS */
color: #fef2aa;
background-color: #fef2aa;
/* Tailwind (arbitrary) */
class="text-[#fef2aa] bg-[#fef2aa]"
/* SCSS */
$brand: #fef2aa;
/* SwiftUI */
Color(red: 0.996, green: 0.949, blue: 0.667)
/* Android */
Color.parseColor("#fef2aa")

Accessibility — WCAG contrast

Aa
#fef2aa on white: 1.14:1
AA ✗ fail · AA-large · AAA
Aa
#fef2aa on black: 18.50:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red99.6%
Green94.9%
Blue66.7%

CMYK percentages

Cyan0.0%
Magenta4.7%
Yellow33.1%
Key (black)0.4%

Color previews

#fef2aa text on a black background

contrast 18.50:1

Card sample

#fef2aa text on a white background

contrast 1.14:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #fef2aa;
Background color
Panel with #fef2aa background
background-color: #fef2aa;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #fef2aa;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(254, 242, 170, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(254, 242, 170, 0.45);
Border & gradient
Gradient panel
border: 3px solid #fef2aa;
background: linear-gradient(135deg, #fef2aa, #D2FEAA);

Monochromatic scale

Palettes built from #fef2aa

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #fef2aa in the Color Lab