Skip to content

#af2ad1

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

RGB
175, 42, 209
HSL
288°, 67%, 49%
CMYK
16, 80, 0, 18
Luminance
0.1537

Every format

HEX#af2ad1
RGBrgb(175, 42, 209)
HSLhsl(288, 67%, 49%)
CMYKcmyk(16%, 80%, 0%, 18%)
LABlab(46.1 72.6 -58.4)
LCHlch(46.1 93.2 321.2)
OKLCHoklch(0.568 0.246 318.1)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#af2ad1 on white: 5.15:1
AA ✓ pass · AA-large · AAA
Aa
#af2ad1 on black: 4.07:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red68.6%
Green16.5%
Blue82.0%

CMYK percentages

Cyan16.3%
Magenta79.9%
Yellow0.0%
Key (black)18.0%

Color previews

#af2ad1 text on a black background

contrast 4.07:1

Card sample

#af2ad1 text on a white background

contrast 5.15:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #af2ad1

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #af2ad1 in the Color Lab