Skip to content

#c40cfd

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

RGB
196, 12, 253
HSL
286°, 98%, 52%
CMYK
23, 95, 0, 1
Luminance
0.1909

Every format

HEX#c40cfd
RGBrgb(196, 12, 253)
HSLhsl(286, 98%, 52%)
CMYKcmyk(23%, 95%, 0%, 1%)
LABlab(50.8 88.7 -75.6)
LCHlch(50.8 116.5 319.6)
OKLCHoklch(0.617 0.301 314.6)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#c40cfd on white: 4.36:1
AA ✗ fail · AA-large · AAA
Aa
#c40cfd on black: 4.82:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red76.9%
Green4.7%
Blue99.2%

CMYK percentages

Cyan22.5%
Magenta95.3%
Yellow0.0%
Key (black)0.8%

Color previews

#c40cfd text on a black background

contrast 4.82:1

Card sample

#c40cfd text on a white background

contrast 4.36:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #c40cfd

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #c40cfd in the Color Lab