#BA31C2#BA31C2

#BA31C2 is a mid, highly saturated purple. Relative luminance 0.165; OKLCH L 57.9% C 0.232 H 325.6°. Best body text is #FFFFFF at 4.88:1 contrast (WCAG AA passes).

Color values

HEX#BA31C2
RGBrgb(186, 49, 194)
HSLhsl(297, 60%, 48%)
HSVhsv(297, 75%, 76%)
CMYKcmyk(4.1%, 74.7%, 0%, 23.9%)
CIE-LABlab(47.67, 70.07, -47.14)
CIE-LCHlch(47.67, 84.45, 326.07°)
OKLaboklab(57.95% 0.1916 -0.1312)
OKLCHoklch(57.95% 0.232 325.6)
XYZxyz(31.0849, 16.5329, 52.5824)
Luminance0.1653 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31C2 #39C231
analogous
#7231C2 #BA31C2 #C23181
triadic
#BA31C2 #C2BA31 #31C2BA
tetradic
#BA31C2 #C27231 #39C231 #3181C2
square
#BA31C2 #C27231 #39C231 #3181C2
split-complementary
#BA31C2 #81C231 #31C272
monochromatic
#5C1860 #8B2591 #BA31C2 #CF5BD6 #DD8CE2

Accessibility & contrast

On white

4.88
#BA31C2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.31
#BA31C2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31C2
4.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31C2#FFFFFF#000000##FFFFFF
##BA31C21.004.884.314.88
#FFFFFF4.881.0021.001.00
#0000004.3121.001.0021.00
##FFFFFF4.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0066C6
Deuteranopia (green-blind)
#5277BF
Tritanopia (blue-blind)
#BE4B78
Achromatopsia (no color)
#717171

Design tokens & code

CSS
--color: #ba31c2;
/* rgb */ color: rgb(186, 49, 194);
/* oklch */ color: oklch(57.9% 0.232 325.6);
Tailwind
colors: {
  custom: {
    50: '#d378d5',
    500: '#ba31c2',
    950: '#000000',
  },
}
SCSS
$custom: #ba31c2;
$custom-light: #d378d5;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31c2",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 194
  },
  "hsl": {
    "h": 296.69,
    "s": 59.671,
    "l": 47.647
  },
  "oklch": {
    "l": 0.57948,
    "c": 0.23225,
    "h": 325.6
  },
  "luminance": 0.16531
}

Semantic roles & 50–950 ramp

primary
#BA31C2
secondary
#87CC83
accent
#E3454E
background
#FDF7FD
surface
#FAEEFA
border
#D3C9D3
text
#150A14
muted
#837C83

Preview Lab

Preview with #BA31C2

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

Preview Lab → · Contrast checker → · Palette generator →

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