#BA40C2#BA40C2

#BA40C2 is a mid, highly saturated purple. Relative luminance 0.180; OKLCH L 59.3% C 0.216 H 325.3°. Best body text is #000000 at 4.60:1 contrast (WCAG AA passes).

Color values

HEX#BA40C2
RGBrgb(186, 64, 194)
HSLhsl(296, 52%, 51%)
HSVhsv(296, 67%, 76%)
CMYKcmyk(4.1%, 67%, 0%, 23.9%)
CIE-LABlab(49.50, 64.86, -44.23)
CIE-LCHlch(49.50, 78.50, 325.71°)
OKLaboklab(59.26% 0.1772 -0.1228)
OKLCHoklch(59.26% 0.216 325.3)
XYZxyz(31.8200, 18.0029, 52.8274)
Luminance0.1800 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA40C2 #48C240
analogous
#7940C2 #BA40C2 #C24089
triadic
#BA40C2 #C2BA40 #40C2BA
tetradic
#BA40C2 #C27940 #48C240 #4089C2
square
#BA40C2 #C27940 #48C240 #4089C2
split-complementary
#BA40C2 #89C240 #40C279
monochromatic
#622167 #8F3095 #BA40C2 #CB6ED1 #DC9DE0

Accessibility & contrast

On white

4.57
#BA40C2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.60
#BA40C2 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #BA40C2
4.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA40C2#FFFFFF#000000##000000
##BA40C21.004.574.604.60
#FFFFFF4.571.0021.0021.00
#0000004.6021.001.001.00
##0000004.6021.001.001.00

Color blindness preview

Protanopia (red-blind)
#256CC6
Deuteranopia (green-blind)
#5A7BBF
Tritanopia (blue-blind)
#BE547C
Achromatopsia (no color)
#767676

Design tokens & code

CSS
--color: #ba40c2;
/* rgb */ color: rgb(186, 64, 194);
/* oklch */ color: oklch(59.3% 0.216 325.3);
Tailwind
colors: {
  custom: {
    50: '#d27fd5',
    500: '#ba40c2',
    950: '#000000',
  },
}
SCSS
$custom: #ba40c2;
$custom-light: #d27fd5;
$custom-dark: #000000;
JSON
{
  "hex": "#ba40c2",
  "rgb": {
    "r": 186,
    "g": 64,
    "b": 194
  },
  "hsl": {
    "h": 296.308,
    "s": 51.587,
    "l": 50.588
  },
  "oklch": {
    "l": 0.59261,
    "c": 0.21557,
    "h": 325.3
  },
  "luminance": 0.18001
}

Semantic roles & 50–950 ramp

primary
#BA40C2
secondary
#96CC92
accent
#DB4D56
background
#FDF8FD
surface
#FAEFFA
border
#D3CAD3
text
#150B14
muted
#837C83

Preview Lab

Preview with #BA40C2

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

Preview Lab → · Contrast checker → · Palette generator →

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