Skip to content

#f2e7af

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

RGB
242, 231, 175
HSL
50°, 72%, 82%
CMYK
0, 5, 28, 5
Luminance
0.7912

Every format

HEX#f2e7af
RGBrgb(242, 231, 175)
HSLhsl(50, 72%, 82%)
CMYKcmyk(0%, 5%, 28%, 5%)
LABlab(91.3 -4.7 28.7)
LCHlch(91.3 29.1 99.3)
OKLCHoklch(0.923 0.073 98.3)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#f2e7af on white: 1.25:1
AA ✗ fail · AA-large · AAA
Aa
#f2e7af on black: 16.82:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red94.9%
Green90.6%
Blue68.6%

CMYK percentages

Cyan0.0%
Magenta4.5%
Yellow27.7%
Key (black)5.1%

Color previews

#f2e7af text on a black background

contrast 16.82:1

Card sample

#f2e7af text on a white background

contrast 1.25:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #f2e7af

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #f2e7af in the Color Lab