Skip to content

#fef2a2

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

RGB
254, 242, 162
HSL
52°, 98%, 82%
CMYK
0, 5, 36, 0
Luminance
0.8718

Every format

HEX#fef2a2
RGBrgb(254, 242, 162)
HSLhsl(52, 98%, 82%)
CMYKcmyk(0%, 5%, 36%, 0%)
LABlab(94.8 -7.3 40.1)
LCHlch(94.8 40.7 100.3)
OKLCHoklch(0.953 0.101 100.7)

Copy-ready code

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

Accessibility — WCAG contrast

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

RGB percentages

Red99.6%
Green94.9%
Blue63.5%

CMYK percentages

Cyan0.0%
Magenta4.7%
Yellow36.2%
Key (black)0.4%

Color previews

#fef2a2 text on a black background

contrast 18.44:1

Card sample

#fef2a2 text on a white background

contrast 1.14:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #fef2a2

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #fef2a2 in the Color Lab