Skip to content

#fef2ac

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

RGB
254, 242, 172
HSL
51°, 98%, 84%
CMYK
0, 5, 32, 0
Luminance
0.8755

Every format

HEX#fef2ac
RGBrgb(254, 242, 172)
HSLhsl(51, 98%, 84%)
CMYKcmyk(0%, 5%, 32%, 0%)
LABlab(95.0 -6.1 35.3)
LCHlch(95.0 35.8 99.8)
OKLCHoklch(0.955 0.089 99.6)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#fef2ac on white: 1.13:1
AA ✗ fail · AA-large · AAA
Aa
#fef2ac on black: 18.51:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red99.6%
Green94.9%
Blue67.5%

CMYK percentages

Cyan0.0%
Magenta4.7%
Yellow32.3%
Key (black)0.4%

Color previews

#fef2ac text on a black background

contrast 18.51:1

Card sample

#fef2ac text on a white background

contrast 1.13:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #fef2ac

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #fef2ac in the Color Lab