#BA31AF#BA31AF

#BA31AF is a mid, highly saturated purple. Relative luminance 0.157; OKLCH L 56.9% C 0.218 H 331.6°. Best body text is #FFFFFF at 5.06:1 contrast (WCAG AA passes).

Color values

HEX#BA31AF
RGBrgb(186, 49, 175)
HSLhsl(305, 58%, 46%)
HSVhsv(305, 74%, 73%)
CMYKcmyk(0%, 73.7%, 5.9%, 27.1%)
CIE-LABlab(46.62, 67.01, -37.68)
CIE-LCHlch(46.62, 76.88, 330.65°)
OKLaboklab(56.87% 0.1917 -0.1037)
OKLCHoklch(56.87% 0.218 331.6)
XYZxyz(29.0859, 15.7332, 42.0540)
Luminance0.1573 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31AF #31BA3C
analogous
#8031BA #BA31AF #BA316A
triadic
#BA31AF #AFBA31 #31AFBA
tetradic
#BA31AF #BA8031 #31BA3C #316ABA
square
#BA31AF #BA8031 #31BA3C #316ABA
split-complementary
#BA31AF #6ABA31 #31BA80
monochromatic
#591754 #8A2481 #BA31AF #D256C8 #DF86D8

Accessibility & contrast

On white

5.06
#BA31AF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.15
#BA31AF on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31AF
5.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31AF#FFFFFF#000000##FFFFFF
##BA31AF1.005.064.155.06
#FFFFFF5.061.0021.001.00
#0000004.1521.001.0021.00
##FFFFFF5.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2662B2
Deuteranopia (green-blind)
#5D75AC
Tritanopia (blue-blind)
#C2416D
Achromatopsia (no color)
#6E6E6E

Design tokens & code

CSS
--color: #ba31af;
/* rgb */ color: rgb(186, 49, 175);
/* oklch */ color: oklch(56.9% 0.218 331.6);
Tailwind
colors: {
  custom: {
    50: '#d377c7',
    500: '#ba31af',
    950: '#000000',
  },
}
SCSS
$custom: #ba31af;
$custom-light: #d377c7;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31af",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 175
  },
  "hsl": {
    "h": 304.818,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.56866,
    "c": 0.21797,
    "h": 331.6
  },
  "luminance": 0.15731
}

Semantic roles & 50–950 ramp

primary
#BA31AF
secondary
#7EC984
accent
#E25346
background
#FDF7FC
surface
#FAEEF8
border
#D3C9D1
text
#150A13
muted
#837C82

Preview Lab

Preview with #BA31AF

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

Preview Lab → · Contrast checker → · Palette generator →

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