Skip to content

#ba0fec

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

RGB
186, 15, 236
HSL
286°, 88%, 49%
CMYK
21, 94, 0, 8
Luminance
0.1684

Every format

HEX#ba0fec
RGBrgb(186, 15, 236)
HSLhsl(286, 88%, 49%)
CMYKcmyk(21%, 94%, 0%, 8%)
LABlab(48.1 84.2 -70.6)
LCHlch(48.1 109.8 320.0)
OKLCHoklch(0.591 0.285 315.5)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#ba0fec on white: 4.81:1
AA ✓ pass · AA-large · AAA
Aa
#ba0fec on black: 4.37:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red72.9%
Green5.9%
Blue92.5%

CMYK percentages

Cyan21.2%
Magenta93.6%
Yellow0.0%
Key (black)7.5%

Color previews

#ba0fec text on a black background

contrast 4.37:1

Card sample

#ba0fec text on a white background

contrast 4.81:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #ba0fec

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #ba0fec in the Color Lab