#BA40E7#BA40E7

#BA40E7 is a mid, highly saturated purple. Relative luminance 0.199; OKLCH L 61.5% C 0.247 H 315.1°. Best body text is #000000 at 4.98:1 contrast (WCAG AA passes).

Color values

HEX#BA40E7
RGBrgb(186, 64, 231)
HSLhsl(284, 78%, 58%)
HSVhsv(284, 72%, 91%)
CMYKcmyk(19.5%, 72.3%, 0%, 9.4%)
CIE-LABlab(51.70, 71.65, -61.85)
CIE-LCHlch(51.70, 94.65, 319.20°)
OKLaboklab(61.54% 0.1751 -0.1743)
OKLCHoklch(61.54% 0.247 315.1)
XYZxyz(36.5046, 19.8768, 77.4995)
Luminance0.1988 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA40E7 #6DE740
analogous
#6640E7 #BA40E7 #E740C1
triadic
#BA40E7 #E7BA40 #40E7BA
tetradic
#BA40E7 #E76640 #6DE740 #40C1E7
square
#BA40E7 #E76640 #6DE740 #40C1E7
split-complementary
#BA40E7 #C1E740 #40E766
monochromatic
#751399 #9F1AD0 #BA40E7 #CE76EE #E1ADF5

Accessibility & contrast

On white

4.22
#BA40E7 on #FFFFFF
AA ✗AA large ✓AAA ✗

On black

4.98
#BA40E7 on #000000
AA ✓AA large ✓AAA ✗

Best text color

#000000 on #BA40E7
4.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA40E7#FFFFFF#000000##000000
##BA40E71.004.224.984.98
#FFFFFF4.221.0021.0021.00
#0000004.9821.001.001.00
##0000004.9821.001.001.00

Color blindness preview

Protanopia (red-blind)
#0074EC
Deuteranopia (green-blind)
#3A7EE3
Tritanopia (blue-blind)
#B66490
Achromatopsia (no color)
#7B7B7B

Design tokens & code

CSS
--color: #ba40e7;
/* rgb */ color: rgb(186, 64, 231);
/* oklch */ color: oklch(61.5% 0.247 315.1);
Tailwind
colors: {
  custom: {
    50: '#d380ef',
    500: '#ba40e7',
    950: '#000000',
  },
}
SCSS
$custom: #ba40e7;
$custom-light: #d380ef;
$custom-dark: #000000;
JSON
{
  "hex": "#ba40e7",
  "rgb": {
    "r": 186,
    "g": 64,
    "b": 231
  },
  "hsl": {
    "h": 283.832,
    "s": 77.674,
    "l": 57.843
  },
  "oklch": {
    "l": 0.61536,
    "c": 0.2471,
    "h": 315.1
  },
  "luminance": 0.19875
}

Semantic roles & 50–950 ramp

primary
#BA40E7
secondary
#B2E3A0
accent
#F43468
background
#FDF8FE
surface
#FBEFFD
border
#D4CAD5
text
#150B17
muted
#837C85

Preview Lab

Preview with #BA40E7

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

Preview Lab → · Contrast checker → · Palette generator →

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