#BA31AC#BA31AC

#BA31AC is a mid, highly saturated purple. Relative luminance 0.156; OKLCH L 56.7% C 0.216 H 332.6°. Best body text is #FFFFFF at 5.09:1 contrast (WCAG AA passes).

Color values

HEX#BA31AC
RGBrgb(186, 49, 172)
HSLhsl(306, 58%, 46%)
HSVhsv(306, 74%, 73%)
CMYKcmyk(0%, 73.7%, 7.5%, 27.1%)
CIE-LABlab(46.47, 66.55, -36.15)
CIE-LCHlch(46.47, 75.74, 331.49°)
OKLaboklab(56.7% 0.1916 -0.0993)
OKLCHoklch(56.7% 0.216 332.6)
XYZxyz(28.7945, 15.6167, 40.5195)
Luminance0.1561 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31AC #31BA3F
analogous
#8331BA #BA31AC #BA3167
triadic
#BA31AC #ACBA31 #31ACBA
tetradic
#BA31AC #BA8331 #31BA3F #3167BA
square
#BA31AC #BA8331 #31BA3F #3167BA
split-complementary
#BA31AC #67BA31 #31BA83
monochromatic
#591752 #8A247F #BA31AC #D256C6 #DF86D6

Accessibility & contrast

On white

5.09
#BA31AC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.12
#BA31AC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31AC
5.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31AC#FFFFFF#000000##FFFFFF
##BA31AC1.005.094.125.09
#FFFFFF5.091.0021.001.00
#0000004.1221.001.0021.00
##FFFFFF5.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2962AF
Deuteranopia (green-blind)
#5E75A9
Tritanopia (blue-blind)
#C2406C
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #ba31ac;
/* rgb */ color: rgb(186, 49, 172);
/* oklch */ color: oklch(56.7% 0.216 332.6);
Tailwind
colors: {
  custom: {
    50: '#d377c5',
    500: '#ba31ac',
    950: '#000000',
  },
}
SCSS
$custom: #ba31ac;
$custom-light: #d377c5;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31ac",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 172
  },
  "hsl": {
    "h": 306.131,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.56704,
    "c": 0.21579,
    "h": 332.6
  },
  "luminance": 0.15614
}

Semantic roles & 50–950 ramp

primary
#BA31AC
secondary
#7EC986
accent
#E25646
background
#FDF7FC
surface
#FAEEF8
border
#D3C9D1
text
#150A13
muted
#837C82

Preview Lab

Preview with #BA31AC

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

Preview Lab → · Contrast checker → · Palette generator →

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