Skip to content

#cc40fd

a balanced, electric violet · warm · closest name: magenta

RGB
204, 64, 253
HSL
284°, 98%, 62%
CMYK
19, 75, 0, 1
Luminance
0.2360

Every format

HEX#cc40fd
RGBrgb(204, 64, 253)
HSLhsl(284, 98%, 62%)
CMYKcmyk(19%, 75%, 0%, 1%)
LABlab(55.7 79.2 -67.6)
LCHlch(55.7 104.1 319.5)
OKLCHoklch(0.653 0.272 315.5)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#cc40fd on white: 3.67:1
AA ✗ fail · AA-large · AAA
Aa
#cc40fd on black: 5.72:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red80.0%
Green25.1%
Blue99.2%

CMYK percentages

Cyan19.4%
Magenta74.7%
Yellow0.0%
Key (black)0.8%

Color previews

#cc40fd text on a black background

contrast 5.72:1

Card sample

#cc40fd text on a white background

contrast 3.67:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #cc40fd

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #cc40fd in the Color Lab