Skip to content

#f0dc21

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

RGB
240, 220, 33
HSL
54°, 87%, 54%
CMYK
0, 8, 86, 6
Luminance
0.6982

Every format

HEX#f0dc21
RGBrgb(240, 220, 33)
HSLhsl(54, 87%, 54%)
CMYKcmyk(0%, 8%, 86%, 6%)
LABlab(86.9 -10.4 82.5)
LCHlch(86.9 83.1 97.2)
OKLCHoklch(0.884 0.180 102.5)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#f0dc21 on white: 1.40:1
AA ✗ fail · AA-large · AAA
Aa
#f0dc21 on black: 14.96:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red94.1%
Green86.3%
Blue12.9%

CMYK percentages

Cyan0.0%
Magenta8.3%
Yellow86.3%
Key (black)5.9%

Color previews

#f0dc21 text on a black background

contrast 14.96:1

Card sample

#f0dc21 text on a white background

contrast 1.40:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(240, 220, 33, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(240, 220, 33, 0.45);
Border & gradient
Gradient panel
border: 3px solid #f0dc21;
background: linear-gradient(135deg, #f0dc21, #7AF021);

Monochromatic scale

Palettes built from #f0dc21

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #f0dc21 in the Color Lab