#BA31A2#BA31A2

#BA31A2 is a mid, highly saturated pink. Relative luminance 0.152; OKLCH L 56.2% C 0.209 H 336.1°. Best body text is #FFFFFF at 5.19:1 contrast (WCAG AA passes).

Color values

HEX#BA31A2
RGBrgb(186, 49, 162)
HSLhsl(311, 58%, 46%)
HSVhsv(311, 74%, 73%)
CMYKcmyk(0%, 73.7%, 12.9%, 27.1%)
CIE-LABlab(45.97, 65.06, -31.00)
CIE-LCHlch(45.97, 72.07, 334.52°)
OKLaboklab(56.18% 0.1909 -0.0845)
OKLCHoklch(56.18% 0.209 336.1)
XYZxyz(27.8700, 15.2469, 35.6505)
Luminance0.1524 (WCAG relative)
Temperatureneutral
Familypink

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31A2 #31BA49
analogous
#8D31BA #BA31A2 #BA315D
triadic
#BA31A2 #A2BA31 #31A2BA
tetradic
#BA31A2 #BA8D31 #31BA49 #315DBA
square
#BA31A2 #BA8D31 #31BA49 #315DBA
split-complementary
#BA31A2 #5DBA31 #31BA8D
monochromatic
#59174E #8A2478 #BA31A2 #D256BD #DF86D0

Accessibility & contrast

On white

5.19
#BA31A2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.05
#BA31A2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31A2
5.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31A2#FFFFFF#000000##FFFFFF
##BA31A21.005.194.055.19
#FFFFFF5.191.0021.001.00
#0000004.0521.001.0021.00
##FFFFFF5.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#3360A5
Deuteranopia (green-blind)
#63749F
Tritanopia (blue-blind)
#C43B66
Achromatopsia (no color)
#6D6D6D

Design tokens & code

CSS
--color: #ba31a2;
/* rgb */ color: rgb(186, 49, 162);
/* oklch */ color: oklch(56.2% 0.209 336.1);
Tailwind
colors: {
  custom: {
    50: '#d377be',
    500: '#ba31a2',
    950: '#000000',
  },
}
SCSS
$custom: #ba31a2;
$custom-light: #d377be;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31a2",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 162
  },
  "hsl": {
    "h": 310.511,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.56185,
    "c": 0.20872,
    "h": 336.1
  },
  "luminance": 0.15244
}

Semantic roles & 50–950 ramp

primary
#BA31A2
secondary
#7EC98B
accent
#E26146
background
#FDF7FB
surface
#FAEEF6
border
#D3C9D0
text
#150A12
muted
#837C81

Preview Lab

Preview with #BA31A2

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

Preview Lab → · Contrast checker → · Palette generator →

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