Skip to content

#ba2fec

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

RGB
186, 47, 236
HSL
284°, 83%, 56%
CMYK
21, 80, 0, 8
Luminance
0.1853

Every format

HEX#ba2fec
RGBrgb(186, 47, 236)
HSLhsl(284, 83%, 56%)
CMYKcmyk(21%, 80%, 0%, 8%)
LABlab(50.1 78.1 -67.2)
LCHlch(50.1 103.0 319.3)
OKLCHoklch(0.605 0.267 314.7)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ba2fec on white: 4.46:1
AA ✗ fail · AA-large · AAA
Aa
#ba2fec on black: 4.71:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red72.9%
Green18.4%
Blue92.5%

CMYK percentages

Cyan21.2%
Magenta80.1%
Yellow0.0%
Key (black)7.5%

Color previews

#ba2fec text on a black background

contrast 4.71:1

Card sample

#ba2fec text on a white background

contrast 4.46:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba2fec

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ba2fec in the Color Lab