#BA31A7#BA31A7

#BA31A7 is a mid, highly saturated purple. Relative luminance 0.154; OKLCH L 56.4% C 0.212 H 334.3°. Best body text is #FFFFFF at 5.14:1 contrast (WCAG AA passes).

Color values

HEX#BA31A7
RGBrgb(186, 49, 167)
HSLhsl(308, 58%, 46%)
HSVhsv(308, 74%, 73%)
CMYKcmyk(0%, 73.7%, 10.2%, 27.1%)
CIE-LABlab(46.22, 65.80, -33.59)
CIE-LCHlch(46.22, 73.88, 332.96°)
OKLaboklab(56.44% 0.1913 -0.0919)
OKLCHoklch(56.44% 0.212 334.3)
XYZxyz(28.3233, 15.4282, 38.0380)
Luminance0.1543 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31A7 #31BA44
analogous
#8831BA #BA31A7 #BA3162
triadic
#BA31A7 #A7BA31 #31A7BA
tetradic
#BA31A7 #BA8831 #31BA44 #3162BA
square
#BA31A7 #BA8831 #31BA44 #3162BA
split-complementary
#BA31A7 #62BA31 #31BA88
monochromatic
#591750 #8A247C #BA31A7 #D256C1 #DF86D3

Accessibility & contrast

On white

5.14
#BA31A7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.09
#BA31A7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31A7
5.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31A7#FFFFFF#000000##FFFFFF
##BA31A71.005.144.095.14
#FFFFFF5.141.0021.001.00
#0000004.0921.001.0021.00
##FFFFFF5.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2F61AA
Deuteranopia (green-blind)
#6175A4
Tritanopia (blue-blind)
#C33D69
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #ba31a7;
/* rgb */ color: rgb(186, 49, 167);
/* oklch */ color: oklch(56.4% 0.212 334.3);
Tailwind
colors: {
  custom: {
    50: '#d377c1',
    500: '#ba31a7',
    950: '#000000',
  },
}
SCSS
$custom: #ba31a7;
$custom-light: #d377c1;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31a7",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 167
  },
  "hsl": {
    "h": 308.321,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.56441,
    "c": 0.21222,
    "h": 334.3
  },
  "luminance": 0.15426
}

Semantic roles & 50–950 ramp

primary
#BA31A7
secondary
#7EC988
accent
#E25C46
background
#FDF7FB
surface
#FAEEF7
border
#D3C9D0
text
#150A12
muted
#837C81

Preview Lab

Preview with #BA31A7

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

Preview Lab → · Contrast checker → · Palette generator →

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