#BA40D5#BA40D5

#BA40D5 is a mid, highly saturated purple. Relative luminance 0.189; OKLCH L 60.4% C 0.232 H 319.7°. Best body text is #000000 at 4.78:1 contrast (WCAG AA passes).

Color values

HEX#BA40D5
RGBrgb(186, 64, 213)
HSLhsl(289, 64%, 54%)
HSVhsv(289, 70%, 84%)
CMYKcmyk(12.7%, 70%, 0%, 16.5%)
CIE-LABlab(50.58, 68.26, -53.42)
CIE-LCHlch(50.58, 86.68, 321.95°)
OKLaboklab(60.39% 0.1767 -0.1496)
OKLCHoklch(60.39% 0.232 319.7)
XYZxyz(34.0918, 18.9117, 64.7925)
Luminance0.1891 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA40D5 #5BD540
analogous
#7040D5 #BA40D5 #D540A5
triadic
#BA40D5 #D5BA40 #40D5BA
tetradic
#BA40D5 #D57040 #5BD540 #40A5D5
square
#BA40D5 #D57040 #5BD540 #40A5D5
split-complementary
#BA40D5 #A5D540 #40D570
monochromatic
#6D1C7F #9827B1 #BA40D5 #CC72E0 #DEA4EB

Accessibility & contrast

On white

4.39
#BA40D5 on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.78
#BA40D5 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #BA40D5
4.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA40D5#FFFFFF#000000##000000
##BA40D51.004.394.784.78
#FFFFFF4.391.0021.0021.00
#0000004.7821.001.001.00
##0000004.7821.001.001.00

Color blindness preview

Protanopia (red-blind)
#0070D9
Deuteranopia (green-blind)
#4C7DD2
Tritanopia (blue-blind)
#BA5C86
Achromatopsia (no color)
#787878

Design tokens & code

CSS
--color: #ba40d5;
/* rgb */ color: rgb(186, 64, 213);
/* oklch */ color: oklch(60.4% 0.232 319.7);
Tailwind
colors: {
  custom: {
    50: '#d37fe3',
    500: '#ba40d5',
    950: '#000000',
  },
}
SCSS
$custom: #ba40d5;
$custom-light: #d37fe3;
$custom-dark: #000000;
JSON
{
  "hex": "#ba40d5",
  "rgb": {
    "r": 186,
    "g": 64,
    "b": 213
  },
  "hsl": {
    "h": 289.128,
    "s": 63.948,
    "l": 54.314
  },
  "oklch": {
    "l": 0.60388,
    "c": 0.23156,
    "h": 319.7
  },
  "luminance": 0.1891
}

Semantic roles & 50–950 ramp

primary
#BA40D5
secondary
#A4D899
accent
#E7415F
background
#FDF8FD
surface
#FAEFFB
border
#D3CAD4
text
#150B15
muted
#837C83

Preview Lab

Preview with #BA40D5

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#BA40D5 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva