Skip to content

#a40fd2

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

RGB
164, 15, 210
HSL
286°, 87%, 44%
CMYK
22, 93, 0, 18
Luminance
0.1289

Every format

HEX#a40fd2
RGBrgb(164, 15, 210)
HSLhsl(286, 87%, 44%)
CMYKcmyk(22%, 93%, 0%, 18%)
LABlab(42.6 76.6 -64.8)
LCHlch(42.6 100.3 319.8)
OKLCHoklch(0.540 0.260 315.1)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#a40fd2 on white: 5.87:1
AA ✓ pass · AA-large · AAA
Aa
#a40fd2 on black: 3.58:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red64.3%
Green5.9%
Blue82.4%

CMYK percentages

Cyan21.9%
Magenta92.9%
Yellow0.0%
Key (black)17.6%

Color previews

#a40fd2 text on a black background

contrast 3.58:1

Card sample

#a40fd2 text on a white background

contrast 5.87:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #a40fd2

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #a40fd2 in the Color Lab