#BA31BB#BA31BB

#BA31BB is a mid, highly saturated purple. Relative luminance 0.162; OKLCH L 57.5% C 0.227 H 327.7°. Best body text is #FFFFFF at 4.95:1 contrast (WCAG AA passes).

Color values

HEX#BA31BB
RGBrgb(186, 49, 187)
HSLhsl(300, 58%, 46%)
HSVhsv(300, 74%, 73%)
CMYKcmyk(0.5%, 73.8%, 0%, 26.7%)
CIE-LABlab(47.27, 68.92, -43.70)
CIE-LCHlch(47.27, 81.60, 327.62°)
OKLaboklab(57.54% 0.1918 -0.1212)
OKLCHoklch(57.54% 0.227 327.7)
XYZxyz(30.3172, 16.2258, 48.5392)
Luminance0.1622 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31BB #32BB31
analogous
#7531BB #BA31BB #BB3177
triadic
#BA31BB #BBBA31 #31BBBA
tetradic
#BA31BB #BB7531 #32BB31 #3177BB
square
#BA31BB #BB7531 #32BB31 #3177BB
split-complementary
#BA31BB #77BB31 #31BB75
monochromatic
#5A185A #8A248B #BA31BB #D256D3 #DF87E0

Accessibility & contrast

On white

4.95
#BA31BB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.24
#BA31BB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31BB
4.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31BB#FFFFFF#000000##FFFFFF
##BA31BB1.004.954.244.95
#FFFFFF4.951.0021.001.00
#0000004.2421.001.0021.00
##FFFFFF4.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1065BF
Deuteranopia (green-blind)
#5676B8
Tritanopia (blue-blind)
#C04774
Achromatopsia (no color)
#707070

Design tokens & code

CSS
--color: #ba31bb;
/* rgb */ color: rgb(186, 49, 187);
/* oklch */ color: oklch(57.5% 0.227 327.7);
Tailwind
colors: {
  custom: {
    50: '#d378d0',
    500: '#ba31bb',
    950: '#000000',
  },
}
SCSS
$custom: #ba31bb;
$custom-light: #d378d0;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31bb",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 187
  },
  "hsl": {
    "h": 299.565,
    "s": 58.475,
    "l": 46.275
  },
  "oklch": {
    "l": 0.57538,
    "c": 0.2269,
    "h": 327.7
  },
  "luminance": 0.16224
}

Semantic roles & 50–950 ramp

primary
#BA31BB
secondary
#7FC97F
accent
#E24647
background
#FDF7FC
surface
#FAEEF9
border
#D3C9D2
text
#150A14
muted
#837C82

Preview Lab

Preview with #BA31BB

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

Preview Lab → · Contrast checker → · Palette generator →

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