#cc02a7
a dark, electric magenta / pink · warm · closest name: purple
RGB
204, 2, 167
HSL
311°, 98%, 40%
CMYK
0, 99, 18, 20
Luminance
0.1567
Every format
| HEX | #cc02a7 |
| RGB | rgb(204, 2, 167) |
| HSL | hsl(311, 98%, 40%) |
| CMYK | cmyk(0%, 99%, 18%, 20%) |
| LAB | lab(46.5 77.9 -32.9) |
| LCH | lch(46.5 84.5 337.1) |
| OKLCH | oklch(0.573 0.249 339.0) |
Copy-ready code
/* CSS */
color: #cc02a7;
background-color: #cc02a7;
/* Tailwind (arbitrary) */
class="text-[#cc02a7] bg-[#cc02a7]"
/* SCSS */
$brand: #cc02a7;
/* SwiftUI */
Color(red: 0.800, green: 0.008, blue: 0.655)
/* Android */
Color.parseColor("#cc02a7")Accessibility — WCAG contrast
Aa
#cc02a7 on white: 5.08:1
AA ✓ pass · AA-large ✓ · AAA ✗
Aa
#cc02a7 on black: 4.13:1
AA ✗ fail · AA-large ✓ · AAA ✗
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red80.0%
Green0.8%
Blue65.5%
CMYK percentages
Cyan0.0%
Magenta99.0%
Yellow18.1%
Key (black)20.0%
Color previews
#cc02a7 text on a black background
contrast 4.13:1
Card sample
#cc02a7 text on a white background
contrast 5.08:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #cc02a7;
Background color
Panel with #cc02a7 background
background-color: #cc02a7;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #cc02a7;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(204, 2, 167, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(204, 2, 167, 0.45);
Border & gradient
Gradient panel
border: 3px solid #cc02a7; background: linear-gradient(135deg, #cc02a7, #CC0220);