Skip to content

#ba4cf2

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

RGB
186, 76, 242
HSL
280°, 87%, 62%
CMYK
23, 69, 0, 5
Luminance
0.2202

Every format

HEX#ba4cf2
RGBrgb(186, 76, 242)
HSLhsl(280, 87%, 62%)
CMYKcmyk(23%, 69%, 0%, 5%)
LABlab(54.0 69.2 -64.2)
LCHlch(54.0 94.4 317.1)
OKLCHoklch(0.634 0.243 311.8)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ba4cf2 on white: 3.89:1
AA ✗ fail · AA-large · AAA
Aa
#ba4cf2 on black: 5.40:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red72.9%
Green29.8%
Blue94.9%

CMYK percentages

Cyan23.1%
Magenta68.6%
Yellow0.0%
Key (black)5.1%

Color previews

#ba4cf2 text on a black background

contrast 5.40:1

Card sample

#ba4cf2 text on a white background

contrast 3.89:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba4cf2

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ba4cf2 in the Color Lab