#BA40B2#BA40B2

#BA40B2 is a mid, highly saturated purple. Relative luminance 0.173; OKLCH L 58.4% C 0.203 H 330.6°. Best body text is #FFFFFF at 4.70:1 contrast (WCAG AA passes).

Color values

HEX#BA40B2
RGBrgb(186, 64, 178)
HSLhsl(304, 49%, 49%)
HSVhsv(304, 66%, 73%)
CMYKcmyk(0%, 65.6%, 4.3%, 27.1%)
CIE-LABlab(48.66, 62.16, -36.23)
CIE-LCHlch(48.66, 71.94, 329.77°)
OKLaboklab(58.39% 0.1765 -0.0996)
OKLCHoklch(58.39% 0.203 330.6)
XYZxyz(30.1188, 17.3225, 43.8681)
Luminance0.1732 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA40B2 #40BA48
analogous
#8540BA #BA40B2 #BA4075
triadic
#BA40B2 #B2BA40 #40B2BA
tetradic
#BA40B2 #BA8540 #40BA48 #4075BA
square
#BA40B2 #BA8540 #40BA48 #4075BA
split-complementary
#BA40B2 #75BA40 #40BA85
monochromatic
#5F215B #8C3086 #BA40B2 #CC6BC6 #DC99D7

Accessibility & contrast

On white

4.70
#BA40B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.46
#BA40B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA40B2
4.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA40B2#FFFFFF#000000##FFFFFF
##BA40B21.004.704.464.70
#FFFFFF4.701.0021.001.00
#0000004.4621.001.0021.00
##FFFFFF4.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3669B5
Deuteranopia (green-blind)
#627AAF
Tritanopia (blue-blind)
#C14D74
Achromatopsia (no color)
#747474

Design tokens & code

CSS
--color: #ba40b2;
/* rgb */ color: rgb(186, 64, 178);
/* oklch */ color: oklch(58.4% 0.203 330.6);
Tailwind
colors: {
  custom: {
    50: '#d27ec9',
    500: '#ba40b2',
    950: '#000000',
  },
}
SCSS
$custom: #ba40b2;
$custom-light: #d27ec9;
$custom-dark: #000000;
JSON
{
  "hex": "#ba40b2",
  "rgb": {
    "r": 186,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 303.934,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.58387,
    "c": 0.20267,
    "h": 330.6
  },
  "luminance": 0.1732
}

Semantic roles & 50–950 ramp

primary
#BA40B2
secondary
#8EC892
accent
#D8584F
background
#FDF8FC
surface
#FAEFF8
border
#D3CAD1
text
#140B13
muted
#837C82

Preview Lab

Preview with #BA40B2

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

Preview Lab → · Contrast checker → · Palette generator →

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