#BA31A5#BA31A5

#BA31A5 is a mid, highly saturated purple. Relative luminance 0.154; OKLCH L 56.3% C 0.211 H 335.0°. Best body text is #FFFFFF at 5.16:1 contrast (WCAG AA passes).

Color values

HEX#BA31A5
RGBrgb(186, 49, 165)
HSLhsl(309, 58%, 46%)
HSVhsv(309, 74%, 73%)
CMYKcmyk(0%, 73.7%, 11.3%, 27.1%)
CIE-LABlab(46.12, 65.50, -32.56)
CIE-LCHlch(46.12, 73.15, 333.57°)
OKLaboklab(56.34% 0.1911 -0.089)
OKLCHoklch(56.34% 0.211 335)
XYZxyz(28.1399, 15.3548, 37.0718)
Luminance0.1535 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31A5 #31BA46
analogous
#8A31BA #BA31A5 #BA3160
triadic
#BA31A5 #A5BA31 #31A5BA
tetradic
#BA31A5 #BA8A31 #31BA46 #3160BA
square
#BA31A5 #BA8A31 #31BA46 #3160BA
split-complementary
#BA31A5 #60BA31 #31BA8A
monochromatic
#59174F #8A247A #BA31A5 #D256BF #DF86D2

Accessibility & contrast

On white

5.16
#BA31A5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.07
#BA31A5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31A5
5.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31A5#FFFFFF#000000##FFFFFF
##BA31A51.005.164.075.16
#FFFFFF5.161.0021.001.00
#0000004.0721.001.0021.00
##FFFFFF5.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3060A8
Deuteranopia (green-blind)
#6274A2
Tritanopia (blue-blind)
#C33C68
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #ba31a5;
/* rgb */ color: rgb(186, 49, 165);
/* oklch */ color: oklch(56.3% 0.211 335.0);
Tailwind
colors: {
  custom: {
    50: '#d377c0',
    500: '#ba31a5',
    950: '#000000',
  },
}
SCSS
$custom: #ba31a5;
$custom-light: #d377c0;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31a5",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 165
  },
  "hsl": {
    "h": 309.197,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.56338,
    "c": 0.21081,
    "h": 335
  },
  "luminance": 0.15352
}

Semantic roles & 50–950 ramp

primary
#BA31A5
secondary
#7EC989
accent
#E25E46
background
#FDF7FB
surface
#FAEEF7
border
#D3C9D0
text
#150A12
muted
#837C81

Preview Lab

Preview with #BA31A5

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

Preview Lab → · Contrast checker → · Palette generator →

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