Skip to content

#ba52ff

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

RGB
186, 82, 255
HSL
276°, 100%, 66%
CMYK
27, 68, 0, 0
Luminance
0.2369

Every format

HEX#ba52ff
RGBrgb(186, 82, 255)
HSLhsl(276, 100%, 66%)
CMYKcmyk(27%, 68%, 0%, 0%)
LABlab(55.8 69.3 -68.7)
LCHlch(55.8 97.6 315.3)
OKLCHoklch(0.649 0.249 308.5)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ba52ff on white: 3.66:1
AA ✗ fail · AA-large · AAA
Aa
#ba52ff on black: 5.74:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red72.9%
Green32.2%
Blue100.0%

CMYK percentages

Cyan27.1%
Magenta67.8%
Yellow0.0%
Key (black)0.0%

Color previews

#ba52ff text on a black background

contrast 5.74:1

Card sample

#ba52ff text on a white background

contrast 3.66:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba52ff

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ba52ff in the Color Lab