#BA31A1#BA31A1

#BA31A1 is a mid, highly saturated pink. Relative luminance 0.152; OKLCH L 56.1% C 0.208 H 336.5°. Best body text is #FFFFFF at 5.20:1 contrast (WCAG AA passes).

Color values

HEX#BA31A1
RGBrgb(186, 49, 161)
HSLhsl(311, 58%, 46%)
HSVhsv(311, 74%, 73%)
CMYKcmyk(0%, 73.7%, 13.4%, 27.1%)
CIE-LABlab(45.92, 64.92, -30.48)
CIE-LCHlch(45.92, 71.72, 334.85°)
OKLaboklab(56.14% 0.1908 -0.083)
OKLCHoklch(56.14% 0.208 336.5)
XYZxyz(27.7815, 15.2115, 35.1843)
Luminance0.1521 (WCAG relative)
Temperatureneutral
Familypink

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31A1 #31BA4A
analogous
#8E31BA #BA31A1 #BA315C
triadic
#BA31A1 #A1BA31 #31A1BA
tetradic
#BA31A1 #BA8E31 #31BA4A #315CBA
square
#BA31A1 #BA8E31 #31BA4A #315CBA
split-complementary
#BA31A1 #5CBA31 #31BA8E
monochromatic
#59174D #8A2477 #BA31A1 #D256BC #DF86CF

Accessibility & contrast

On white

5.20
#BA31A1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.04
#BA31A1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31A1
5.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31A1#FFFFFF#000000##FFFFFF
##BA31A11.005.204.045.20
#FFFFFF5.201.0021.001.00
#0000004.0421.001.0021.00
##FFFFFF5.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3460A4
Deuteranopia (green-blind)
#63749E
Tritanopia (blue-blind)
#C43A66
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #ba31a1;
/* rgb */ color: rgb(186, 49, 161);
/* oklch */ color: oklch(56.1% 0.208 336.5);
Tailwind
colors: {
  custom: {
    50: '#d377bd',
    500: '#ba31a1',
    950: '#000000',
  },
}
SCSS
$custom: #ba31a1;
$custom-light: #d377bd;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31a1",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 161
  },
  "hsl": {
    "h": 310.949,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.56135,
    "c": 0.20803,
    "h": 336.5
  },
  "luminance": 0.15209
}

Semantic roles & 50–950 ramp

primary
#BA31A1
secondary
#7EC98C
accent
#E26346
background
#FDF7FB
surface
#FAEEF6
border
#D3C9D0
text
#150A12
muted
#837C81

Preview Lab

Preview with #BA31A1

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

Preview Lab → · Contrast checker → · Palette generator →

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