Skip to content

#ab2fec

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

RGB
171, 47, 236
HSL
279°, 83%, 56%
CMYK
28, 80, 0, 8
Luminance
0.1675

Every format

HEX#ab2fec
RGBrgb(171, 47, 236)
HSLhsl(279, 83%, 56%)
CMYKcmyk(28%, 80%, 0%, 8%)
LABlab(47.9 75.6 -70.9)
LCHlch(47.9 103.6 316.9)
OKLCHoklch(0.586 0.263 310.1)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ab2fec on white: 4.83:1
AA ✓ pass · AA-large · AAA
Aa
#ab2fec on black: 4.35:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red67.1%
Green18.4%
Blue92.5%

CMYK percentages

Cyan27.5%
Magenta80.1%
Yellow0.0%
Key (black)7.5%

Color previews

#ab2fec text on a black background

contrast 4.35:1

Card sample

#ab2fec text on a white background

contrast 4.83:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ab2fec

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ab2fec in the Color Lab