Skip to content

#ba4dfb

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

RGB
186, 77, 251
HSL
278°, 96%, 64%
CMYK
26, 69, 0, 2
Luminance
0.2271

Every format

HEX#ba4dfb
RGBrgb(186, 77, 251)
HSLhsl(278, 96%, 64%)
CMYKcmyk(26%, 69%, 0%, 2%)
LABlab(54.8 70.6 -68.1)
LCHlch(54.8 98.1 316.0)
OKLCHoklch(0.641 0.251 309.8)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ba4dfb on white: 3.79:1
AA ✗ fail · AA-large · AAA
Aa
#ba4dfb on black: 5.54:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red72.9%
Green30.2%
Blue98.4%

CMYK percentages

Cyan25.9%
Magenta69.3%
Yellow0.0%
Key (black)1.6%

Color previews

#ba4dfb text on a black background

contrast 5.54:1

Card sample

#ba4dfb text on a white background

contrast 3.79:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba4dfb

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ba4dfb in the Color Lab