Skip to content

#ab2fd2

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

RGB
171, 47, 210
HSL
286°, 64%, 50%
CMYK
19, 78, 0, 18
Luminance
0.1534

Every format

HEX#ab2fd2
RGBrgb(171, 47, 210)
HSLhsl(286, 64%, 50%)
CMYKcmyk(19%, 78%, 0%, 18%)
LABlab(46.1 70.6 -59.0)
LCHlch(46.1 92.0 320.1)
OKLCHoklch(0.567 0.241 316.4)

Copy-ready code

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

Accessibility — WCAG contrast

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

RGB percentages

Red67.1%
Green18.4%
Blue82.4%

CMYK percentages

Cyan18.6%
Magenta77.6%
Yellow0.0%
Key (black)17.6%

Color previews

#ab2fd2 text on a black background

contrast 4.07:1

Card sample

#ab2fd2 text on a white background

contrast 5.16:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(171, 47, 210, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(171, 47, 210, 0.45);
Border & gradient
Gradient panel
border: 3px solid #ab2fd2;
background: linear-gradient(135deg, #ab2fd2, #D22F8C);

Monochromatic scale

Palettes built from #ab2fd2

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ab2fd2 in the Color Lab