Skip to content

#cc2af2

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

RGB
204, 42, 242
HSL
289°, 89%, 56%
CMYK
16, 83, 0, 5
Luminance
0.2090

Every format

HEX#cc2af2
RGBrgb(204, 42, 242)
HSLhsl(289, 89%, 56%)
CMYKcmyk(16%, 83%, 0%, 5%)
LABlab(52.9 83.3 -66.0)
LCHlch(52.9 106.3 321.6)
OKLCHoklch(0.631 0.281 318.6)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#cc2af2 on white: 4.05:1
AA ✗ fail · AA-large · AAA
Aa
#cc2af2 on black: 5.18:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red80.0%
Green16.5%
Blue94.9%

CMYK percentages

Cyan15.7%
Magenta82.6%
Yellow0.0%
Key (black)5.1%

Color previews

#cc2af2 text on a black background

contrast 5.18:1

Card sample

#cc2af2 text on a white background

contrast 4.05:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #cc2af2

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #cc2af2 in the Color Lab