Skip to content

#ba3afe

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

RGB
186, 58, 254
HSL
279°, 99%, 61%
CMYK
27, 77, 0, 0
Luminance
0.2062

Every format

HEX#ba3afe
RGBrgb(186, 58, 254)
HSLhsl(279, 99%, 61%)
CMYKcmyk(27%, 77%, 0%, 0%)
LABlab(52.5 78.2 -73.4)
LCHlch(52.5 107.2 316.8)
OKLCHoklch(0.626 0.273 310.3)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ba3afe on white: 4.10:1
AA ✗ fail · AA-large · AAA
Aa
#ba3afe on black: 5.12:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red72.9%
Green22.7%
Blue99.6%

CMYK percentages

Cyan26.8%
Magenta77.2%
Yellow0.0%
Key (black)0.4%

Color previews

#ba3afe text on a black background

contrast 5.12:1

Card sample

#ba3afe text on a white background

contrast 4.10:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba3afe

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ba3afe in the Color Lab