Skip to content

#c40dfb

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

RGB
196, 13, 251
HSL
286°, 97%, 52%
CMYK
22, 95, 0, 2
Luminance
0.1899

Every format

HEX#c40dfb
RGBrgb(196, 13, 251)
HSLhsl(286, 97%, 52%)
CMYKcmyk(22%, 95%, 0%, 2%)
LABlab(50.7 88.3 -74.7)
LCHlch(50.7 115.6 319.8)
OKLCHoklch(0.616 0.299 315.0)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#c40dfb on white: 4.38:1
AA ✗ fail · AA-large · AAA
Aa
#c40dfb on black: 4.80:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red76.9%
Green5.1%
Blue98.4%

CMYK percentages

Cyan21.9%
Magenta94.8%
Yellow0.0%
Key (black)1.6%

Color previews

#c40dfb text on a black background

contrast 4.80:1

Card sample

#c40dfb text on a white background

contrast 4.38:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #c40dfb

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #c40dfb in the Color Lab