#BA31BA#BA31BA

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

Color values

HEX#BA31BA
RGBrgb(186, 49, 186)
HSLhsl(300, 58%, 46%)
HSVhsv(300, 74%, 73%)
CMYKcmyk(0%, 73.7%, 0%, 27.1%)
CIE-LABlab(47.21, 68.75, -43.20)
CIE-LCHlch(47.21, 81.20, 327.86°)
OKLaboklab(57.48% 0.1919 -0.1197)
OKLCHoklch(57.48% 0.226 328)
XYZxyz(30.2106, 16.1831, 47.9773)
Luminance0.1618 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31BA #31BA31
analogous
#7531BA #BA31BA #BA3175
triadic
#BA31BA #BABA31 #31BABA
tetradic
#BA31BA #BA7531 #31BA31 #3175BA
square
#BA31BA #BA7531 #31BA31 #3175BA
split-complementary
#BA31BA #75BA31 #31BA75
monochromatic
#591759 #8A248A #BA31BA #D256D2 #DF86DF

Accessibility & contrast

On white

4.96
#BA31BA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

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

Best text color

#FFFFFF on #BA31BA
4.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31BA#FFFFFF#000000##FFFFFF
##BA31BA1.004.964.244.96
#FFFFFF4.961.0021.001.00
#0000004.2421.001.0021.00
##FFFFFF4.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1365BE
Deuteranopia (green-blind)
#5776B7
Tritanopia (blue-blind)
#C04773
Achromatopsia (no color)
#707070

Design tokens & code

CSS
--color: #ba31ba;
/* rgb */ color: rgb(186, 49, 186);
/* oklch */ color: oklch(57.5% 0.226 328.0);
Tailwind
colors: {
  custom: {
    50: '#d378cf',
    500: '#ba31ba',
    950: '#000000',
  },
}
SCSS
$custom: #ba31ba;
$custom-light: #d378cf;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31ba",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 186
  },
  "hsl": {
    "h": 300,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.5748,
    "c": 0.22615,
    "h": 328
  },
  "luminance": 0.16181
}

Semantic roles & 50–950 ramp

primary
#BA31BA
secondary
#7EC97E
accent
#E24646
background
#FDF7FC
surface
#FAEEF9
border
#D3C9D2
text
#150A14
muted
#837C82

Preview Lab

Preview with #BA31BA

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

Preview Lab → · Contrast checker → · Palette generator →

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