#BA31A6#BA31A6

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

Color values

HEX#BA31A6
RGBrgb(186, 49, 166)
HSLhsl(309, 58%, 46%)
HSVhsv(309, 74%, 73%)
CMYKcmyk(0%, 73.7%, 10.8%, 27.1%)
CIE-LABlab(46.17, 65.65, -33.07)
CIE-LCHlch(46.17, 73.51, 333.26°)
OKLaboklab(56.39% 0.1912 -0.0905)
OKLCHoklch(56.39% 0.212 334.7)
XYZxyz(28.2313, 15.3914, 37.5530)
Luminance0.1539 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31A6 #31BA45
analogous
#8931BA #BA31A6 #BA3161
triadic
#BA31A6 #A6BA31 #31A6BA
tetradic
#BA31A6 #BA8931 #31BA45 #3161BA
square
#BA31A6 #BA8931 #31BA45 #3161BA
split-complementary
#BA31A6 #61BA31 #31BA89
monochromatic
#591750 #8A247B #BA31A6 #D256C0 #DF86D2

Accessibility & contrast

On white

5.15
#BA31A6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.08
#BA31A6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31A6
5.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31A6#FFFFFF#000000##FFFFFF
##BA31A61.005.154.085.15
#FFFFFF5.151.0021.001.00
#0000004.0821.001.0021.00
##FFFFFF5.151.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2F60A9
Deuteranopia (green-blind)
#6174A3
Tritanopia (blue-blind)
#C33D68
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #ba31a6;
/* rgb */ color: rgb(186, 49, 166);
/* oklch */ color: oklch(56.4% 0.212 334.7);
Tailwind
colors: {
  custom: {
    50: '#d377c1',
    500: '#ba31a6',
    950: '#000000',
  },
}
SCSS
$custom: #ba31a6;
$custom-light: #d377c1;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31a6",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 166
  },
  "hsl": {
    "h": 308.759,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.56389,
    "c": 0.21151,
    "h": 334.7
  },
  "luminance": 0.15389
}

Semantic roles & 50–950 ramp

primary
#BA31A6
secondary
#7EC989
accent
#E25D46
background
#FDF7FB
surface
#FAEEF7
border
#D3C9D0
text
#150A12
muted
#837C81

Preview Lab

Preview with #BA31A6

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

Preview Lab → · Contrast checker → · Palette generator →

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