#BA40AB#BA40AB

#BA40AB is a mid, vivid purple. Relative luminance 0.170; OKLCH L 58.0% C 0.197 H 333.1°. Best body text is #FFFFFF at 4.76:1 contrast (WCAG AA passes).

Color values

HEX#BA40AB
RGBrgb(186, 64, 171)
HSLhsl(307, 49%, 49%)
HSVhsv(307, 66%, 73%)
CMYKcmyk(0%, 65.6%, 8.1%, 27.1%)
CIE-LABlab(48.32, 61.03, -32.65)
CIE-LCHlch(48.32, 69.22, 331.85°)
OKLaboklab(58.03% 0.1758 -0.0894)
OKLCHoklch(58.03% 0.197 333.1)
XYZxyz(29.4339, 17.0485, 40.2606)
Luminance0.1705 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA40AB #40BA4F
analogous
#8C40BA #BA40AB #BA406E
triadic
#BA40AB #ABBA40 #40ABBA
tetradic
#BA40AB #BA8C40 #40BA4F #406EBA
square
#BA40AB #BA8C40 #40BA4F #406EBA
split-complementary
#BA40AB #6EBA40 #40BA8C
monochromatic
#5F2157 #8C3081 #BA40AB #CC6BC0 #DC99D4

Accessibility & contrast

On white

4.76
#BA40AB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.41
#BA40AB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA40AB
4.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA40AB#FFFFFF#000000##FFFFFF
##BA40AB1.004.764.414.76
#FFFFFF4.761.0021.001.00
#0000004.4121.001.0021.00
##FFFFFF4.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3C67AE
Deuteranopia (green-blind)
#6679A8
Tritanopia (blue-blind)
#C24A70
Achromatopsia (no color)
#737373

Design tokens & code

CSS
--color: #ba40ab;
/* rgb */ color: rgb(186, 64, 171);
/* oklch */ color: oklch(58.0% 0.197 333.1);
Tailwind
colors: {
  custom: {
    50: '#d27ec4',
    500: '#ba40ab',
    950: '#000000',
  },
}
SCSS
$custom: #ba40ab;
$custom-light: #d27ec4;
$custom-dark: #000000;
JSON
{
  "hex": "#ba40ab",
  "rgb": {
    "r": 186,
    "g": 64,
    "b": 171
  },
  "hsl": {
    "h": 307.377,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.58027,
    "c": 0.19724,
    "h": 333.1
  },
  "luminance": 0.17046
}

Semantic roles & 50–950 ramp

primary
#BA40AB
secondary
#8EC895
accent
#D8604F
background
#FDF8FC
surface
#FAEFF8
border
#D3CAD1
text
#140B12
muted
#837C81

Preview Lab

Preview with #BA40AB

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

Preview Lab → · Contrast checker → · Palette generator →

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