#ba40df
a balanced, vivid violet · warm · closest name: magenta
RGB
186, 64, 223
HSL
286°, 71%, 56%
CMYK
17, 71, 0, 13
Luminance
0.1943
Every format
| HEX | #ba40df |
| RGB | rgb(186, 64, 223) |
| HSL | hsl(286, 71%, 56%) |
| CMYK | cmyk(17%, 71%, 0%, 13%) |
| LAB | lab(51.2 70.1 -58.1) |
| LCH | lch(51.2 91.1 320.3) |
| OKLCH | oklch(0.610 0.240 317.1) |
Copy-ready code
/* CSS */
color: #ba40df;
background-color: #ba40df;
/* Tailwind (arbitrary) */
class="text-[#ba40df] bg-[#ba40df]"
/* SCSS */
$brand: #ba40df;
/* SwiftUI */
Color(red: 0.729, green: 0.251, blue: 0.875)
/* Android */
Color.parseColor("#ba40df")Accessibility — WCAG contrast
Aa
#ba40df on white: 4.30:1
AA ✗ fail · AA-large ✓ · AAA ✗
Aa
#ba40df on black: 4.89:1
AA ✓ pass · AA-large ✓ · AAA ✗
true color
protanopia
deuteranopia
tritanopia
RGB percentages
Red72.9%
Green25.1%
Blue87.5%
CMYK percentages
Cyan16.6%
Magenta71.3%
Yellow0.0%
Key (black)12.5%
Color previews
#ba40df text on a black background
contrast 4.89:1
Card sample
#ba40df text on a white background
contrast 4.30:1
Card sample
CSS3 live lab
Text font color
The quick brown fox
color: #ba40df;
Background color
Panel with #ba40df background
background-color: #ba40df;
Text shadow — hex
Glowing headline
text-shadow: 2px 2px 8px #ba40df;
Text shadow — RGB
Soft neon halo
text-shadow: 0 0 14px rgba(186, 64, 223, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(186, 64, 223, 0.45);
Border & gradient
Gradient panel
border: 3px solid #ba40df; background: linear-gradient(135deg, #ba40df, #DF409A);