Skip to content

#ba2dfd

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

RGB
186, 45, 253
HSL
281°, 98%, 58%
CMYK
27, 82, 0, 1
Luminance
0.1941

Every format

HEX#ba2dfd
RGBrgb(186, 45, 253)
HSLhsl(281, 98%, 58%)
CMYKcmyk(27%, 82%, 0%, 1%)
LABlab(51.2 81.8 -75.0)
LCHlch(51.2 111.0 317.5)
OKLCHoklch(0.616 0.282 311.1)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ba2dfd on white: 4.30:1
AA ✗ fail · AA-large · AAA
Aa
#ba2dfd on black: 4.88:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red72.9%
Green17.6%
Blue99.2%

CMYK percentages

Cyan26.5%
Magenta82.2%
Yellow0.0%
Key (black)0.8%

Color previews

#ba2dfd text on a black background

contrast 4.88:1

Card sample

#ba2dfd text on a white background

contrast 4.30:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba2dfd

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ba2dfd in the Color Lab