#BA40E2#BA40E2

#BA40E2 is a mid, highly saturated purple. Relative luminance 0.196; OKLCH L 61.2% C 0.243 H 316.4°. Best body text is #000000 at 4.92:1 contrast (WCAG AA passes).

Color values

HEX#BA40E2
RGBrgb(186, 64, 226)
HSLhsl(285, 74%, 57%)
HSVhsv(285, 72%, 89%)
CMYKcmyk(17.7%, 71.7%, 0%, 11.4%)
CIE-LABlab(51.38, 70.69, -59.54)
CIE-LCHlch(51.38, 92.42, 319.90°)
OKLaboklab(61.21% 0.1757 -0.1675)
OKLCHoklch(61.21% 0.243 316.4)
XYZxyz(35.8085, 19.5983, 73.8334)
Luminance0.1960 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA40E2 #68E240
analogous
#6940E2 #BA40E2 #E240B9
triadic
#BA40E2 #E2BA40 #40E2BA
tetradic
#BA40E2 #E26940 #68E240 #40B9E2
square
#BA40E2 #E26940 #68E240 #40B9E2
split-complementary
#BA40E2 #B9E240 #40E269
monochromatic
#731692 #9D1EC7 #BA40E2 #CD75EA #E0AAF2

Accessibility & contrast

On white

4.27
#BA40E2 on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.92
#BA40E2 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #BA40E2
4.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA40E2#FFFFFF#000000##000000
##BA40E21.004.274.924.92
#FFFFFF4.271.0021.0021.00
#0000004.9221.001.001.00
##0000004.9221.001.001.00

Color blindness preview

Protanopia (red-blind)
#0073E7
Deuteranopia (green-blind)
#407EDE
Tritanopia (blue-blind)
#B8628E
Achromatopsia (no color)
#7A7A7A

Design tokens & code

CSS
--color: #ba40e2;
/* rgb */ color: rgb(186, 64, 226);
/* oklch */ color: oklch(61.2% 0.243 316.4);
Tailwind
colors: {
  custom: {
    50: '#d380ec',
    500: '#ba40e2',
    950: '#000000',
  },
}
SCSS
$custom: #ba40e2;
$custom-light: #d380ec;
$custom-dark: #000000;
JSON
{
  "hex": "#ba40e2",
  "rgb": {
    "r": 186,
    "g": 64,
    "b": 226
  },
  "hsl": {
    "h": 285.185,
    "s": 73.636,
    "l": 56.863
  },
  "oklch": {
    "l": 0.6121,
    "c": 0.24275,
    "h": 316.4
  },
  "luminance": 0.19597
}

Semantic roles & 50–950 ramp

primary
#BA40E2
secondary
#AEE09E
accent
#F03865
background
#FDF8FE
surface
#FBEFFD
border
#D4CAD5
text
#150B16
muted
#837C84

Preview Lab

Preview with #BA40E2

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

Preview Lab → · Contrast checker → · Palette generator →

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