Skip to content

#ba5df7

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

RGB
186, 93, 247
HSL
276°, 91%, 67%
CMYK
25, 62, 0, 3
Luminance
0.2498

Every format

HEX#ba5df7
RGBrgb(186, 93, 247)
HSLhsl(276, 91%, 67%)
CMYKcmyk(25%, 62%, 0%, 3%)
LABlab(57.1 62.7 -62.2)
LCHlch(57.1 88.3 315.2)
OKLCHoklch(0.657 0.227 309.3)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ba5df7 on white: 3.50:1
AA ✗ fail · AA-large · AAA
Aa
#ba5df7 on black: 6.00:1
AA ✓ pass · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red72.9%
Green36.5%
Blue96.9%

CMYK percentages

Cyan24.7%
Magenta62.3%
Yellow0.0%
Key (black)3.1%

Color previews

#ba5df7 text on a black background

contrast 6.00:1

Card sample

#ba5df7 text on a white background

contrast 3.50:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba5df7

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ba5df7 in the Color Lab