Skip to content

#d42dfb

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

RGB
212, 45, 251
HSL
289°, 96%, 58%
CMYK
16, 82, 0, 2
Luminance
0.2284

Every format

HEX#d42dfb
RGBrgb(212, 45, 251)
HSLhsl(289, 96%, 58%)
CMYKcmyk(16%, 82%, 0%, 2%)
LABlab(54.9 85.5 -67.7)
LCHlch(54.9 109.0 321.6)
OKLCHoklch(0.650 0.289 318.7)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#d42dfb on white: 3.77:1
AA ✗ fail · AA-large · AAA
Aa
#d42dfb on black: 5.57:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red83.1%
Green17.6%
Blue98.4%

CMYK percentages

Cyan15.5%
Magenta82.1%
Yellow0.0%
Key (black)1.6%

Color previews

#d42dfb text on a black background

contrast 5.57:1

Card sample

#d42dfb text on a white background

contrast 3.77:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #d42dfb

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #d42dfb in the Color Lab