#BA31B7#BA31B7

#BA31B7 is a mid, highly saturated purple. Relative luminance 0.161; OKLCH L 57.3% C 0.224 H 329.0°. Best body text is #FFFFFF at 4.99:1 contrast (WCAG AA passes).

Color values

HEX#BA31B7
RGBrgb(186, 49, 183)
HSLhsl(301, 58%, 46%)
HSVhsv(301, 74%, 73%)
CMYKcmyk(0%, 73.7%, 1.6%, 27.1%)
CIE-LABlab(47.05, 68.27, -41.71)
CIE-LCHlch(47.05, 80.00, 328.58°)
OKLaboklab(57.31% 0.1919 -0.1154)
OKLCHoklch(57.31% 0.224 329)
XYZxyz(29.8950, 16.0569, 46.3153)
Luminance0.1605 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31B7 #31BA34
analogous
#7831BA #BA31B7 #BA3172
triadic
#BA31B7 #B7BA31 #31B7BA
tetradic
#BA31B7 #BA7831 #31BA34 #3172BA
square
#BA31B7 #BA7831 #31BA34 #3172BA
split-complementary
#BA31B7 #72BA31 #31BA78
monochromatic
#591758 #8A2487 #BA31B7 #D256D0 #DF86DD

Accessibility & contrast

On white

4.99
#BA31B7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.21
#BA31B7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31B7
4.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31B7#FFFFFF#000000##FFFFFF
##BA31B71.004.994.214.99
#FFFFFF4.991.0021.001.00
#0000004.2121.001.0021.00
##FFFFFF4.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1A64BB
Deuteranopia (green-blind)
#5976B4
Tritanopia (blue-blind)
#C04572
Achromatopsia (no color)
#707070

Design tokens & code

CSS
--color: #ba31b7;
/* rgb */ color: rgb(186, 49, 183);
/* oklch */ color: oklch(57.3% 0.224 329.0);
Tailwind
colors: {
  custom: {
    50: '#d377cd',
    500: '#ba31b7',
    950: '#000000',
  },
}
SCSS
$custom: #ba31b7;
$custom-light: #d377cd;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31b7",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 183
  },
  "hsl": {
    "h": 301.314,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.57309,
    "c": 0.22389,
    "h": 329
  },
  "luminance": 0.16055
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #BA31B7

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

Preview Lab → · Contrast checker → · Palette generator →

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