Skip to content

#ab7dfd

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

RGB
171, 125, 253
HSL
262°, 97%, 74%
CMYK
32, 51, 0, 1
Luminance
0.3042

Every format

HEX#ab7dfd
RGBrgb(171, 125, 253)
HSLhsl(262, 97%, 74%)
CMYKcmyk(32%, 51%, 0%, 1%)
LABlab(62.0 44.1 -57.7)
LCHlch(62.0 72.6 307.4)
OKLCHoklch(0.691 0.184 298.0)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ab7dfd on white: 2.96:1
AA ✗ fail · AA-large · AAA
Aa
#ab7dfd on black: 7.08:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red67.1%
Green49.0%
Blue99.2%

CMYK percentages

Cyan32.4%
Magenta50.6%
Yellow0.0%
Key (black)0.8%

Color previews

#ab7dfd text on a black background

contrast 7.08:1

Card sample

#ab7dfd text on a white background

contrast 2.96:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ab7dfd

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ab7dfd in the Color Lab