Skip to content

#ccaf02

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

RGB
204, 175, 2
HSL
51°, 98%, 40%
CMYK
0, 14, 99, 20
Luminance
0.4350

Every format

HEX#ccaf02
RGBrgb(204, 175, 2)
HSLhsl(51, 98%, 40%)
CMYKcmyk(0%, 14%, 99%, 20%)
LABlab(71.9 -3.4 74.0)
LCHlch(71.9 74.1 92.6)
OKLCHoklch(0.757 0.156 97.1)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ccaf02 on white: 2.16:1
AA ✗ fail · AA-large · AAA
Aa
#ccaf02 on black: 9.70:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red80.0%
Green68.6%
Blue0.8%

CMYK percentages

Cyan0.0%
Magenta14.2%
Yellow99.0%
Key (black)20.0%

Color previews

#ccaf02 text on a black background

contrast 9.70:1

Card sample

#ccaf02 text on a white background

contrast 2.16:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(204, 175, 2, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(204, 175, 2, 0.45);
Border & gradient
Gradient panel
border: 3px solid #ccaf02;
background: linear-gradient(135deg, #ccaf02, #62CC02);

Monochromatic scale

Palettes built from #ccaf02

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ccaf02 in the Color Lab