Skip to content

#f2cf42

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

RGB
242, 207, 66
HSL
48°, 87%, 60%
CMYK
0, 15, 73, 5
Luminance
0.6390

Every format

HEX#f2cf42
RGBrgb(242, 207, 66)
HSLhsl(48, 87%, 60%)
CMYKcmyk(0%, 15%, 73%, 5%)
LABlab(83.9 -1.9 70.5)
LCHlch(83.9 70.6 91.6)
OKLCHoklch(0.861 0.156 94.6)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#f2cf42 on white: 1.52:1
AA ✗ fail · AA-large · AAA
Aa
#f2cf42 on black: 13.78:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red94.9%
Green81.2%
Blue25.9%

CMYK percentages

Cyan0.0%
Magenta14.5%
Yellow72.7%
Key (black)5.1%

Color previews

#f2cf42 text on a black background

contrast 13.78:1

Card sample

#f2cf42 text on a white background

contrast 1.52:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #f2cf42

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #f2cf42 in the Color Lab