Skip to content

#fef040

a balanced, electric yellow · cool · closest name: gold

RGB
254, 240, 64
HSL
56°, 99%, 62%
CMYK
0, 6, 75, 0
Luminance
0.8376

Every format

HEX#fef040
RGBrgb(254, 240, 64)
HSLhsl(56, 99%, 62%)
CMYKcmyk(0%, 6%, 75%, 0%)
LABlab(93.3 -13.5 80.5)
LCHlch(93.3 81.6 99.5)
OKLCHoklch(0.938 0.182 104.7)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#fef040 on white: 1.18:1
AA ✗ fail · AA-large · AAA
Aa
#fef040 on black: 17.75:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red99.6%
Green94.1%
Blue25.1%

CMYK percentages

Cyan0.0%
Magenta5.5%
Yellow74.8%
Key (black)0.4%

Color previews

#fef040 text on a black background

contrast 17.75:1

Card sample

#fef040 text on a white background

contrast 1.18:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #fef040

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #fef040 in the Color Lab