Skip to content

#fef2b2

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

RGB
254, 242, 178
HSL
51°, 97%, 85%
CMYK
0, 5, 30, 0
Luminance
0.8779

Every format

HEX#fef2b2
RGBrgb(254, 242, 178)
HSLhsl(51, 97%, 85%)
CMYKcmyk(0%, 5%, 30%, 0%)
LABlab(95.1 -5.4 32.4)
LCHlch(95.1 32.9 99.4)
OKLCHoklch(0.956 0.082 98.8)

Copy-ready code

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

Accessibility — WCAG contrast

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

RGB percentages

Red99.6%
Green94.9%
Blue69.8%

CMYK percentages

Cyan0.0%
Magenta4.7%
Yellow29.9%
Key (black)0.4%

Color previews

#fef2b2 text on a black background

contrast 18.56:1

Card sample

#fef2b2 text on a white background

contrast 1.13:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #fef2b2

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #fef2b2 in the Color Lab