#BA31A4#BA31A4

#BA31A4 is a mid, highly saturated purple. Relative luminance 0.153; OKLCH L 56.3% C 0.210 H 335.4°. Best body text is #FFFFFF at 5.17:1 contrast (WCAG AA passes).

Color values

HEX#BA31A4
RGBrgb(186, 49, 164)
HSLhsl(310, 58%, 46%)
HSVhsv(310, 74%, 73%)
CMYKcmyk(0%, 73.7%, 11.8%, 27.1%)
CIE-LABlab(46.07, 65.36, -32.04)
CIE-LCHlch(46.07, 72.79, 333.88°)
OKLaboklab(56.29% 0.191 -0.0875)
OKLCHoklch(56.29% 0.21 335.4)
XYZxyz(28.0492, 15.3186, 36.5943)
Luminance0.1532 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31A4 #31BA47
analogous
#8B31BA #BA31A4 #BA315F
triadic
#BA31A4 #A4BA31 #31A4BA
tetradic
#BA31A4 #BA8B31 #31BA47 #315FBA
square
#BA31A4 #BA8B31 #31BA47 #315FBA
split-complementary
#BA31A4 #5FBA31 #31BA8B
monochromatic
#59174F #8A2479 #BA31A4 #D256BE #DF86D1

Accessibility & contrast

On white

5.17
#BA31A4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.06
#BA31A4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31A4
5.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31A4#FFFFFF#000000##FFFFFF
##BA31A41.005.174.065.17
#FFFFFF5.171.0021.001.00
#0000004.0621.001.0021.00
##FFFFFF5.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3160A7
Deuteranopia (green-blind)
#6274A1
Tritanopia (blue-blind)
#C33C67
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #ba31a4;
/* rgb */ color: rgb(186, 49, 164);
/* oklch */ color: oklch(56.3% 0.210 335.4);
Tailwind
colors: {
  custom: {
    50: '#d377bf',
    500: '#ba31a4',
    950: '#000000',
  },
}
SCSS
$custom: #ba31a4;
$custom-light: #d377bf;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31a4",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 164
  },
  "hsl": {
    "h": 309.635,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.56287,
    "c": 0.21011,
    "h": 335.4
  },
  "luminance": 0.15316
}

Semantic roles & 50–950 ramp

primary
#BA31A4
secondary
#7EC98A
accent
#E25F46
background
#FDF7FB
surface
#FAEEF7
border
#D3C9D0
text
#150A12
muted
#837C81

Preview Lab

Preview with #BA31A4

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

Preview Lab → · Contrast checker → · Palette generator →

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