#BA31B2#BA31B2

#BA31B2 is a mid, highly saturated purple. Relative luminance 0.159; OKLCH L 57.0% C 0.220 H 330.6°. Best body text is #FFFFFF at 5.04:1 contrast (WCAG AA passes).

Color values

HEX#BA31B2
RGBrgb(186, 49, 178)
HSLhsl(304, 58%, 46%)
HSVhsv(304, 74%, 73%)
CMYKcmyk(0%, 73.7%, 4.3%, 27.1%)
CIE-LABlab(46.78, 67.48, -39.20)
CIE-LCHlch(46.78, 78.04, 329.85°)
OKLaboklab(57.03% 0.1918 -0.1081)
OKLCHoklch(57.03% 0.22 330.6)
XYZxyz(29.3838, 15.8524, 43.6231)
Luminance0.1585 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31B2 #31BA39
analogous
#7D31BA #BA31B2 #BA316D
triadic
#BA31B2 #B2BA31 #31B2BA
tetradic
#BA31B2 #BA7D31 #31BA39 #316DBA
square
#BA31B2 #BA7D31 #31BA39 #316DBA
split-complementary
#BA31B2 #6DBA31 #31BA7D
monochromatic
#591755 #8A2484 #BA31B2 #D256CB #DF86DA

Accessibility & contrast

On white

5.04
#BA31B2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.17
#BA31B2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31B2
5.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31B2#FFFFFF#000000##FFFFFF
##BA31B21.005.044.175.04
#FFFFFF5.041.0021.001.00
#0000004.1721.001.0021.00
##FFFFFF5.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2263B6
Deuteranopia (green-blind)
#5B75AF
Tritanopia (blue-blind)
#C1436F
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #ba31b2;
/* rgb */ color: rgb(186, 49, 178);
/* oklch */ color: oklch(57.0% 0.220 330.6);
Tailwind
colors: {
  custom: {
    50: '#d377c9',
    500: '#ba31b2',
    950: '#000000',
  },
}
SCSS
$custom: #ba31b2;
$custom-light: #d377c9;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31b2",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 178
  },
  "hsl": {
    "h": 303.504,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.5703,
    "c": 0.22018,
    "h": 330.6
  },
  "luminance": 0.1585
}

Semantic roles & 50–950 ramp

primary
#BA31B2
secondary
#7EC982
accent
#E24F46
background
#FDF7FC
surface
#FAEEF8
border
#D3C9D1
text
#150A13
muted
#837C82

Preview Lab

Preview with #BA31B2

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

Preview Lab → · Contrast checker → · Palette generator →

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