Skip to content

#cc2afb

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

RGB
204, 42, 251
HSL
287°, 96%, 58%
CMYK
19, 83, 0, 2
Luminance
0.2146

Every format

HEX#cc2afb
RGBrgb(204, 42, 251)
HSLhsl(287, 96%, 58%)
CMYKcmyk(19%, 83%, 0%, 2%)
LABlab(53.5 84.9 -70.1)
LCHlch(53.5 110.1 320.5)
OKLCHoklch(0.637 0.288 316.6)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#cc2afb on white: 3.97:1
AA ✗ fail · AA-large · AAA
Aa
#cc2afb on black: 5.29:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red80.0%
Green16.5%
Blue98.4%

CMYK percentages

Cyan18.7%
Magenta83.3%
Yellow0.0%
Key (black)1.6%

Color previews

#cc2afb text on a black background

contrast 5.29:1

Card sample

#cc2afb text on a white background

contrast 3.97:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #cc2afb

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #cc2afb in the Color Lab