Skip to content

#d40cff

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

RGB
212, 12, 255
HSL
289°, 100%, 52%
CMYK
17, 95, 0, 0
Luminance
0.2148

Every format

HEX#d40cff
RGBrgb(212, 12, 255)
HSLhsl(289, 100%, 52%)
CMYKcmyk(17%, 95%, 0%, 0%)
LABlab(53.5 91.2 -72.2)
LCHlch(53.5 116.3 321.6)
OKLCHoklch(0.641 0.306 318.3)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#d40cff on white: 3.97:1
AA ✗ fail · AA-large · AAA
Aa
#d40cff on black: 5.30:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red83.1%
Green4.7%
Blue100.0%

CMYK percentages

Cyan16.9%
Magenta95.3%
Yellow0.0%
Key (black)0.0%

Color previews

#d40cff text on a black background

contrast 5.30:1

Card sample

#d40cff text on a white background

contrast 3.97:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #d40cff

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #d40cff in the Color Lab