#BA31BD#BA31BD

#BA31BD is a mid, highly saturated purple. Relative luminance 0.163; OKLCH L 57.7% C 0.228 H 327.1°. Best body text is #FFFFFF at 4.93:1 contrast (WCAG AA passes).

Color values

HEX#BA31BD
RGBrgb(186, 49, 189)
HSLhsl(299, 59%, 47%)
HSVhsv(299, 74%, 74%)
CMYKcmyk(1.6%, 74.1%, 0%, 25.9%)
CIE-LABlab(47.38, 69.24, -44.69)
CIE-LCHlch(47.38, 82.41, 327.16°)
OKLaboklab(57.65% 0.1918 -0.124)
OKLCHoklch(57.65% 0.228 327.1)
XYZxyz(30.5328, 16.3120, 49.6746)
Luminance0.1631 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31BD #34BD31
analogous
#7431BD #BA31BD #BD317A
triadic
#BA31BD #BDBA31 #31BDBA
tetradic
#BA31BD #BD7431 #34BD31 #317ABD
square
#BA31BD #BD7431 #34BD31 #317ABD
split-complementary
#BA31BD #7ABD31 #31BD74
monochromatic
#5A185C #8A248C #BA31BD #D158D4 #DE88E0

Accessibility & contrast

On white

4.93
#BA31BD on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.26
#BA31BD on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31BD
4.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31BD#FFFFFF#000000##FFFFFF
##BA31BD1.004.934.264.93
#FFFFFF4.931.0021.001.00
#0000004.2621.001.0021.00
##FFFFFF4.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0965C1
Deuteranopia (green-blind)
#5576BA
Tritanopia (blue-blind)
#BF4875
Achromatopsia (no color)
#707070

Design tokens & code

CSS
--color: #ba31bd;
/* rgb */ color: rgb(186, 49, 189);
/* oklch */ color: oklch(57.7% 0.228 327.1);
Tailwind
colors: {
  custom: {
    50: '#d378d1',
    500: '#ba31bd',
    950: '#000000',
  },
}
SCSS
$custom: #ba31bd;
$custom-light: #d378d1;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31bd",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 189
  },
  "hsl": {
    "h": 298.714,
    "s": 58.824,
    "l": 46.667
  },
  "oklch": {
    "l": 0.57654,
    "c": 0.22842,
    "h": 327.1
  },
  "luminance": 0.1631
}

Semantic roles & 50–950 ramp

primary
#BA31BD
secondary
#81CA80
accent
#E24649
background
#FDF7FC
surface
#FAEEF9
border
#D3C9D2
text
#150A14
muted
#837C82

Preview Lab

Preview with #BA31BD

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

Preview Lab → · Contrast checker → · Palette generator →

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