Skip to content

#ab4afb

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

RGB
171, 74, 251
HSL
273°, 96%, 64%
CMYK
32, 71, 0, 2
Luminance
0.2052

Every format

HEX#ab4afb
RGBrgb(171, 74, 251)
HSLhsl(273, 96%, 64%)
CMYKcmyk(32%, 71%, 0%, 2%)
LABlab(52.4 69.0 -72.0)
LCHlch(52.4 99.7 313.8)
OKLCHoklch(0.621 0.250 305.1)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ab4afb on white: 4.11:1
AA ✗ fail · AA-large · AAA
Aa
#ab4afb on black: 5.10:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red67.1%
Green29.0%
Blue98.4%

CMYK percentages

Cyan31.9%
Magenta70.5%
Yellow0.0%
Key (black)1.6%

Color previews

#ab4afb text on a black background

contrast 5.10:1

Card sample

#ab4afb text on a white background

contrast 4.11:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ab4afb

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ab4afb in the Color Lab