#BA40B7#BA40B7

#BA40B7 is a mid, highly saturated purple. Relative luminance 0.175; OKLCH L 58.7% C 0.207 H 328.8°. Best body text is #FFFFFF at 4.66:1 contrast (WCAG AA passes).

Color values

HEX#BA40B7
RGBrgb(186, 64, 183)
HSLhsl(301, 49%, 49%)
HSVhsv(301, 66%, 73%)
CMYKcmyk(0%, 65.6%, 1.6%, 27.1%)
CIE-LABlab(48.92, 62.98, -38.75)
CIE-LCHlch(48.92, 73.95, 328.40°)
OKLaboklab(58.65% 0.1768 -0.1069)
OKLCHoklch(58.65% 0.207 328.8)
XYZxyz(30.6300, 17.5269, 46.5603)
Luminance0.1752 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA40B7 #40BA43
analogous
#8040BA #BA40B7 #BA407A
triadic
#BA40B7 #B7BA40 #40B7BA
tetradic
#BA40B7 #BA8040 #40BA43 #407ABA
square
#BA40B7 #BA8040 #40BA43 #407ABA
split-complementary
#BA40B7 #7ABA40 #40BA80
monochromatic
#5F215D #8C308A #BA40B7 #CC6BCA #DC99DA

Accessibility & contrast

On white

4.66
#BA40B7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.51
#BA40B7 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#FFFFFF on #BA40B7
4.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA40B7#FFFFFF#000000##FFFFFF
##BA40B71.004.664.514.66
#FFFFFF4.661.0021.001.00
#0000004.5121.001.0021.00
##FFFFFF4.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#326ABA
Deuteranopia (green-blind)
#607AB4
Tritanopia (blue-blind)
#C04F76
Achromatopsia (no color)
#747474

Design tokens & code

CSS
--color: #ba40b7;
/* rgb */ color: rgb(186, 64, 183);
/* oklch */ color: oklch(58.7% 0.207 328.8);
Tailwind
colors: {
  custom: {
    50: '#d27ecd',
    500: '#ba40b7',
    950: '#000000',
  },
}
SCSS
$custom: #ba40b7;
$custom-light: #d27ecd;
$custom-dark: #000000;
JSON
{
  "hex": "#ba40b7",
  "rgb": {
    "r": 186,
    "g": 64,
    "b": 183
  },
  "hsl": {
    "h": 301.475,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.58653,
    "c": 0.20663,
    "h": 328.8
  },
  "luminance": 0.17525
}

Semantic roles & 50–950 ramp

primary
#BA40B7
secondary
#8EC890
accent
#D8534F
background
#FDF8FC
surface
#FAEFF9
border
#D3CAD2
text
#140B13
muted
#837C82

Preview Lab

Preview with #BA40B7

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

Preview Lab → · Contrast checker → · Palette generator →

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