Skip to content

#ab4fec

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

RGB
171, 79, 236
HSL
275°, 81%, 62%
CMYK
28, 67, 0, 8
Luminance
0.2031

Every format

HEX#ab4fec
RGBrgb(171, 79, 236)
HSLhsl(275, 81%, 62%)
CMYKcmyk(28%, 67%, 0%, 8%)
LABlab(52.2 63.6 -64.0)
LCHlch(52.2 90.2 314.8)
OKLCHoklch(0.616 0.230 307.9)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ab4fec on white: 4.15:1
AA ✗ fail · AA-large · AAA
Aa
#ab4fec on black: 5.06:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red67.1%
Green31.0%
Blue92.5%

CMYK percentages

Cyan27.5%
Magenta66.5%
Yellow0.0%
Key (black)7.5%

Color previews

#ab4fec text on a black background

contrast 5.06:1

Card sample

#ab4fec text on a white background

contrast 4.15:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ab4fec

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ab4fec in the Color Lab