Skip to content

#d52afe

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

RGB
213, 42, 254
HSL
288°, 99%, 58%
CMYK
16, 84, 0, 0
Luminance
0.2296

Every format

HEX#d52afe
RGBrgb(213, 42, 254)
HSLhsl(288, 99%, 58%)
CMYKcmyk(16%, 84%, 0%, 0%)
LABlab(55.0 86.8 -69.1)
LCHlch(55.0 111.0 321.5)
OKLCHoklch(0.652 0.293 318.4)

Copy-ready code

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

Accessibility — WCAG contrast

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

RGB percentages

Red83.5%
Green16.5%
Blue99.6%

CMYK percentages

Cyan16.1%
Magenta83.5%
Yellow0.0%
Key (black)0.4%

Color previews

#d52afe text on a black background

contrast 5.59:1

Card sample

#d52afe text on a white background

contrast 3.76:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

text-shadow: 0 0 14px rgba(213, 42, 254, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(213, 42, 254, 0.45);
Border & gradient
Gradient panel
border: 3px solid #d52afe;
background: linear-gradient(135deg, #d52afe, #FE2A9A);

Monochromatic scale

Palettes built from #d52afe

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #d52afe in the Color Lab