#BA31A8#BA31A8

#BA31A8 is a mid, highly saturated purple. Relative luminance 0.155; OKLCH L 56.5% C 0.213 H 334.0°. Best body text is #FFFFFF at 5.13:1 contrast (WCAG AA passes).

Color values

HEX#BA31A8
RGBrgb(186, 49, 168)
HSLhsl(308, 58%, 46%)
HSVhsv(308, 74%, 73%)
CMYKcmyk(0%, 73.7%, 9.7%, 27.1%)
CIE-LABlab(46.27, 65.95, -34.11)
CIE-LCHlch(46.27, 74.25, 332.65°)
OKLaboklab(56.49% 0.1913 -0.0934)
OKLCHoklch(56.49% 0.213 334)
XYZxyz(28.4161, 15.4653, 38.5267)
Luminance0.1546 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31A8 #31BA43
analogous
#8731BA #BA31A8 #BA3163
triadic
#BA31A8 #A8BA31 #31A8BA
tetradic
#BA31A8 #BA8731 #31BA43 #3163BA
square
#BA31A8 #BA8731 #31BA43 #3163BA
split-complementary
#BA31A8 #63BA31 #31BA87
monochromatic
#591750 #8A247C #BA31A8 #D256C2 #DF86D3

Accessibility & contrast

On white

5.13
#BA31A8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.09
#BA31A8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31A8
5.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31A8#FFFFFF#000000##FFFFFF
##BA31A81.005.134.095.13
#FFFFFF5.131.0021.001.00
#0000004.0921.001.0021.00
##FFFFFF5.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2E61AB
Deuteranopia (green-blind)
#6075A5
Tritanopia (blue-blind)
#C33E69
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #ba31a8;
/* rgb */ color: rgb(186, 49, 168);
/* oklch */ color: oklch(56.5% 0.213 334.0);
Tailwind
colors: {
  custom: {
    50: '#d377c2',
    500: '#ba31a8',
    950: '#000000',
  },
}
SCSS
$custom: #ba31a8;
$custom-light: #d377c2;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31a8",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 168
  },
  "hsl": {
    "h": 307.883,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.56493,
    "c": 0.21293,
    "h": 334
  },
  "luminance": 0.15463
}

Semantic roles & 50–950 ramp

primary
#BA31A8
secondary
#7EC988
accent
#E25B46
background
#FDF7FC
surface
#FAEEF8
border
#D3C9D1
text
#150A12
muted
#837C81

Preview Lab

Preview with #BA31A8

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

Preview Lab → · Contrast checker → · Palette generator →

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