Skip to content

#d42dfd

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

RGB
212, 45, 253
HSL
288°, 98%, 58%
CMYK
16, 82, 0, 1
Luminance
0.2297

Every format

HEX#d42dfd
RGBrgb(212, 45, 253)
HSLhsl(288, 98%, 58%)
CMYKcmyk(16%, 82%, 0%, 1%)
LABlab(55.0 85.8 -68.6)
LCHlch(55.0 109.9 321.4)
OKLCHoklch(0.651 0.290 318.3)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#d42dfd on white: 3.75:1
AA ✗ fail · AA-large · AAA
Aa
#d42dfd on black: 5.59:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red83.1%
Green17.6%
Blue99.2%

CMYK percentages

Cyan16.2%
Magenta82.2%
Yellow0.0%
Key (black)0.8%

Color previews

#d42dfd text on a black background

contrast 5.59:1

Card sample

#d42dfd text on a white background

contrast 3.75:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #d42dfd

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #d42dfd in the Color Lab