#BA31B6#BA31B6

#BA31B6 is a mid, highly saturated purple. Relative luminance 0.160; OKLCH L 57.3% C 0.223 H 329.3°. Best body text is #FFFFFF at 5.00:1 contrast (WCAG AA passes).

Color values

HEX#BA31B6
RGBrgb(186, 49, 182)
HSLhsl(302, 58%, 46%)
HSVhsv(302, 74%, 73%)
CMYKcmyk(0%, 73.7%, 2.2%, 27.1%)
CIE-LABlab(46.99, 68.11, -41.21)
CIE-LCHlch(46.99, 79.61, 328.83°)
OKLaboklab(57.25% 0.1919 -0.1139)
OKLCHoklch(57.25% 0.223 329.3)
XYZxyz(29.7913, 16.0154, 45.7691)
Luminance0.1601 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31B6 #31BA35
analogous
#7931BA #BA31B6 #BA3171
triadic
#BA31B6 #B6BA31 #31B6BA
tetradic
#BA31B6 #BA7931 #31BA35 #3171BA
square
#BA31B6 #BA7931 #31BA35 #3171BA
split-complementary
#BA31B6 #71BA31 #31BA79
monochromatic
#591757 #8A2487 #BA31B6 #D256CF #DF86DD

Accessibility & contrast

On white

5.00
#BA31B6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.20
#BA31B6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31B6
5.00:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31B6#FFFFFF#000000##FFFFFF
##BA31B61.005.004.205.00
#FFFFFF5.001.0021.001.00
#0000004.2021.001.0021.00
##FFFFFF5.001.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1B64BA
Deuteranopia (green-blind)
#5976B3
Tritanopia (blue-blind)
#C14571
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #ba31b6;
/* rgb */ color: rgb(186, 49, 182);
/* oklch */ color: oklch(57.3% 0.223 329.3);
Tailwind
colors: {
  custom: {
    50: '#d377cc',
    500: '#ba31b6',
    950: '#000000',
  },
}
SCSS
$custom: #ba31b6;
$custom-light: #d377cc;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31b6",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 182
  },
  "hsl": {
    "h": 301.752,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.57253,
    "c": 0.22314,
    "h": 329.3
  },
  "luminance": 0.16013
}

Semantic roles & 50–950 ramp

primary
#BA31B6
secondary
#7EC980
accent
#E24B46
background
#FDF7FC
surface
#FAEEF9
border
#D3C9D2
text
#150A13
muted
#837C82

Preview Lab

Preview with #BA31B6

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

Preview Lab → · Contrast checker → · Palette generator →

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