#BA31B5#BA31B5

#BA31B5 is a mid, highly saturated purple. Relative luminance 0.160; OKLCH L 57.2% C 0.222 H 329.6°. Best body text is #FFFFFF at 5.01:1 contrast (WCAG AA passes).

Color values

HEX#BA31B5
RGBrgb(186, 49, 181)
HSLhsl(302, 58%, 46%)
HSVhsv(302, 74%, 73%)
CMYKcmyk(0%, 73.7%, 2.7%, 27.1%)
CIE-LABlab(46.94, 67.95, -40.71)
CIE-LCHlch(46.94, 79.21, 329.08°)
OKLaboklab(57.2% 0.1919 -0.1125)
OKLCHoklch(57.2% 0.222 329.6)
XYZxyz(29.6883, 15.9742, 45.2268)
Luminance0.1597 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31B5 #31BA36
analogous
#7A31BA #BA31B5 #BA3170
triadic
#BA31B5 #B5BA31 #31B5BA
tetradic
#BA31B5 #BA7A31 #31BA36 #3170BA
square
#BA31B5 #BA7A31 #31BA36 #3170BA
split-complementary
#BA31B5 #70BA31 #31BA7A
monochromatic
#591757 #8A2486 #BA31B5 #D256CE #DF86DC

Accessibility & contrast

On white

5.01
#BA31B5 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.19
#BA31B5 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31B5
5.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31B5#FFFFFF#000000##FFFFFF
##BA31B51.005.014.195.01
#FFFFFF5.011.0021.001.00
#0000004.1921.001.0021.00
##FFFFFF5.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1D64B9
Deuteranopia (green-blind)
#5A76B2
Tritanopia (blue-blind)
#C14471
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #ba31b5;
/* rgb */ color: rgb(186, 49, 181);
/* oklch */ color: oklch(57.2% 0.222 329.6);
Tailwind
colors: {
  custom: {
    50: '#d377cc',
    500: '#ba31b5',
    950: '#000000',
  },
}
SCSS
$custom: #ba31b5;
$custom-light: #d377cc;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31b5",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 181
  },
  "hsl": {
    "h": 302.19,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.57197,
    "c": 0.2224,
    "h": 329.6
  },
  "luminance": 0.15972
}

Semantic roles & 50–950 ramp

primary
#BA31B5
secondary
#7EC981
accent
#E24C46
background
#FDF7FC
surface
#FAEEF9
border
#D3C9D2
text
#150A13
muted
#837C82

Preview Lab

Preview with #BA31B5

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

Preview Lab → · Contrast checker → · Palette generator →

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