#BA31AB#BA31AB

#BA31AB is a mid, highly saturated purple. Relative luminance 0.156; OKLCH L 56.7% C 0.215 H 332.9°. Best body text is #FFFFFF at 5.10:1 contrast (WCAG AA passes).

Color values

HEX#BA31AB
RGBrgb(186, 49, 171)
HSLhsl(307, 58%, 46%)
HSVhsv(307, 74%, 73%)
CMYKcmyk(0%, 73.7%, 8.1%, 27.1%)
CIE-LABlab(46.42, 66.40, -35.64)
CIE-LCHlch(46.42, 75.36, 331.77°)
OKLaboklab(56.65% 0.1915 -0.0979)
OKLCHoklch(56.65% 0.215 332.9)
XYZxyz(28.6988, 15.5784, 40.0156)
Luminance0.1558 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31AB #31BA40
analogous
#8431BA #BA31AB #BA3166
triadic
#BA31AB #ABBA31 #31ABBA
tetradic
#BA31AB #BA8431 #31BA40 #3166BA
square
#BA31AB #BA8431 #31BA40 #3166BA
split-complementary
#BA31AB #66BA31 #31BA84
monochromatic
#591752 #8A247E #BA31AB #D256C5 #DF86D5

Accessibility & contrast

On white

5.10
#BA31AB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.12
#BA31AB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31AB
5.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31AB#FFFFFF#000000##FFFFFF
##BA31AB1.005.104.125.10
#FFFFFF5.101.0021.001.00
#0000004.1221.001.0021.00
##FFFFFF5.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2B61AE
Deuteranopia (green-blind)
#5F75A8
Tritanopia (blue-blind)
#C23F6B
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #ba31ab;
/* rgb */ color: rgb(186, 49, 171);
/* oklch */ color: oklch(56.7% 0.215 332.9);
Tailwind
colors: {
  custom: {
    50: '#d377c4',
    500: '#ba31ab',
    950: '#000000',
  },
}
SCSS
$custom: #ba31ab;
$custom-light: #d377c4;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31ab",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 171
  },
  "hsl": {
    "h": 306.569,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.56651,
    "c": 0.21507,
    "h": 332.9
  },
  "luminance": 0.15576
}

Semantic roles & 50–950 ramp

primary
#BA31AB
secondary
#7EC986
accent
#E25746
background
#FDF7FC
surface
#FAEEF8
border
#D3C9D1
text
#150A13
muted
#837C82

Preview Lab

Preview with #BA31AB

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

Preview Lab → · Contrast checker → · Palette generator →

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