#BA31B4#BA31B4

#BA31B4 is a mid, highly saturated purple. Relative luminance 0.159; OKLCH L 57.1% C 0.222 H 329.9°. Best body text is #FFFFFF at 5.02:1 contrast (WCAG AA passes).

Color values

HEX#BA31B4
RGBrgb(186, 49, 180)
HSLhsl(303, 58%, 46%)
HSVhsv(303, 74%, 73%)
CMYKcmyk(0%, 73.7%, 3.2%, 27.1%)
CIE-LABlab(46.89, 67.80, -40.20)
CIE-LCHlch(46.89, 78.82, 329.33°)
OKLaboklab(57.14% 0.1918 -0.111)
OKLCHoklch(57.14% 0.222 329.9)
XYZxyz(29.5861, 15.9333, 44.6883)
Luminance0.1593 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31B4 #31BA37
analogous
#7B31BA #BA31B4 #BA316F
triadic
#BA31B4 #B4BA31 #31B4BA
tetradic
#BA31B4 #BA7B31 #31BA37 #316FBA
square
#BA31B4 #BA7B31 #31BA37 #316FBA
split-complementary
#BA31B4 #6FBA31 #31BA7B
monochromatic
#591756 #8A2485 #BA31B4 #D256CD #DF86DB

Accessibility & contrast

On white

5.02
#BA31B4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

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

Best text color

#FFFFFF on #BA31B4
5.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31B4#FFFFFF#000000##FFFFFF
##BA31B41.005.024.195.02
#FFFFFF5.021.0021.001.00
#0000004.1921.001.0021.00
##FFFFFF5.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1F63B8
Deuteranopia (green-blind)
#5A76B1
Tritanopia (blue-blind)
#C14470
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #ba31b4;
/* rgb */ color: rgb(186, 49, 180);
/* oklch */ color: oklch(57.1% 0.222 329.9);
Tailwind
colors: {
  custom: {
    50: '#d377cb',
    500: '#ba31b4',
    950: '#000000',
  },
}
SCSS
$custom: #ba31b4;
$custom-light: #d377cb;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31b4",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 180
  },
  "hsl": {
    "h": 302.628,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.57141,
    "c": 0.22165,
    "h": 329.9
  },
  "luminance": 0.15931
}

Semantic roles & 50–950 ramp

primary
#BA31B4
secondary
#7EC981
accent
#E24D46
background
#FDF7FC
surface
#FAEEF8
border
#D3C9D1
text
#150A13
muted
#837C82

Preview Lab

Preview with #BA31B4

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

Preview Lab → · Contrast checker → · Palette generator →

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