#ab2afd
a balanced, electric violet · warm · closest name: magenta
RGB
171, 42, 253
HSL
277°, 98%, 58%
CMYK
32, 83, 0, 1
Luminance
0.1741
Every format
| HEX | #ab2afd |
| RGB | rgb(171, 42, 253) |
| HSL | hsl(277, 98%, 58%) |
| CMYK | cmyk(32%, 83%, 0%, 1%) |
| LAB | lab(48.8 80.4 -79.0) |
| LCH | lch(48.8 112.8 315.5) |
| OKLCH | oklch(0.595 0.281 306.7) |
Copy-ready code
/* CSS */
color: #ab2afd;
background-color: #ab2afd;
/* Tailwind (arbitrary) */
class="text-[#ab2afd] bg-[#ab2afd]"
/* SCSS */
$brand: #ab2afd;
/* SwiftUI */
Color(red: 0.671, green: 0.165, blue: 0.992)
/* Android */
Color.parseColor("#ab2afd")Accessibility — WCAG contrast
Aa
#ab2afd on white: 4.69:1
AA ✓ pass · AA-large ✓ · AAA ✗
Aa
#ab2afd on black: 4.48:1
AA ✗ fail · AA-large ✓ · AAA ✗
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red67.1%
Green16.5%
Blue99.2%
CMYK percentages
Cyan32.4%
Magenta83.4%
Yellow0.0%
Key (black)0.8%
Color previews
#ab2afd text on a black background
contrast 4.48:1
Card sample
#ab2afd text on a white background
contrast 4.69:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #ab2afd;
Background color
Panel with #ab2afd background
background-color: #ab2afd;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #ab2afd;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(171, 42, 253, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(171, 42, 253, 0.45);
Border & gradient
Gradient panel
border: 3px solid #ab2afd; background: linear-gradient(135deg, #ab2afd, #FD2AC2);