#BA31B1#BA31B1

#BA31B1 is a mid, highly saturated purple. Relative luminance 0.158; OKLCH L 57.0% C 0.219 H 330.9°. Best body text is #FFFFFF at 5.05:1 contrast (WCAG AA passes).

Color values

HEX#BA31B1
RGBrgb(186, 49, 177)
HSLhsl(304, 58%, 46%)
HSVhsv(304, 74%, 73%)
CMYKcmyk(0%, 73.7%, 4.8%, 27.1%)
CIE-LABlab(46.73, 67.32, -38.69)
CIE-LCHlch(46.73, 77.65, 330.11°)
OKLaboklab(56.97% 0.1918 -0.1067)
OKLCHoklch(56.97% 0.219 330.9)
XYZxyz(29.2838, 15.8124, 43.0962)
Luminance0.1581 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31B1 #31BA3A
analogous
#7E31BA #BA31B1 #BA316C
triadic
#BA31B1 #B1BA31 #31B1BA
tetradic
#BA31B1 #BA7E31 #31BA3A #316CBA
square
#BA31B1 #BA7E31 #31BA3A #316CBA
split-complementary
#BA31B1 #6CBA31 #31BA7E
monochromatic
#591755 #8A2483 #BA31B1 #D256CA #DF86D9

Accessibility & contrast

On white

5.05
#BA31B1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.16
#BA31B1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31B1
5.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31B1#FFFFFF#000000##FFFFFF
##BA31B11.005.054.165.05
#FFFFFF5.051.0021.001.00
#0000004.1621.001.0021.00
##FFFFFF5.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2363B4
Deuteranopia (green-blind)
#5C75AE
Tritanopia (blue-blind)
#C1426E
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #ba31b1;
/* rgb */ color: rgb(186, 49, 177);
/* oklch */ color: oklch(57.0% 0.219 330.9);
Tailwind
colors: {
  custom: {
    50: '#d377c9',
    500: '#ba31b1',
    950: '#000000',
  },
}
SCSS
$custom: #ba31b1;
$custom-light: #d377c9;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31b1",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 177
  },
  "hsl": {
    "h": 303.942,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.56975,
    "c": 0.21944,
    "h": 330.9
  },
  "luminance": 0.1581
}

Semantic roles & 50–950 ramp

primary
#BA31B1
secondary
#7EC983
accent
#E25046
background
#FDF7FC
surface
#FAEEF8
border
#D3C9D1
text
#150A13
muted
#837C82

Preview Lab

Preview with #BA31B1

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

Preview Lab → · Contrast checker → · Palette generator →

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