#BA31B3#BA31B3

#BA31B3 is a mid, highly saturated purple. Relative luminance 0.159; OKLCH L 57.1% C 0.221 H 330.3°. Best body text is #FFFFFF at 5.03:1 contrast (WCAG AA passes).

Color values

HEX#BA31B3
RGBrgb(186, 49, 179)
HSLhsl(303, 58%, 46%)
HSVhsv(303, 74%, 73%)
CMYKcmyk(0%, 73.7%, 3.8%, 27.1%)
CIE-LABlab(46.83, 67.64, -39.70)
CIE-LCHlch(46.83, 78.43, 329.59°)
OKLaboklab(57.08% 0.1918 -0.1096)
OKLCHoklch(57.08% 0.221 330.3)
XYZxyz(29.4846, 15.8927, 44.1538)
Luminance0.1589 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#BA31B3 #31BA38
analogous
#7C31BA #BA31B3 #BA316E
triadic
#BA31B3 #B3BA31 #31B3BA
tetradic
#BA31B3 #BA7C31 #31BA38 #316EBA
square
#BA31B3 #BA7C31 #31BA38 #316EBA
split-complementary
#BA31B3 #6EBA31 #31BA7C
monochromatic
#591756 #8A2484 #BA31B3 #D256CC #DF86DB

Accessibility & contrast

On white

5.03
#BA31B3 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

4.18
#BA31B3 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #BA31B3
5.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##BA31B3#FFFFFF#000000##FFFFFF
##BA31B31.005.034.185.03
#FFFFFF5.031.0021.001.00
#0000004.1821.001.0021.00
##FFFFFF5.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#2063B7
Deuteranopia (green-blind)
#5B76B0
Tritanopia (blue-blind)
#C14370
Achromatopsia (no color)
#6F6F6F

Design tokens & code

CSS
--color: #ba31b3;
/* rgb */ color: rgb(186, 49, 179);
/* oklch */ color: oklch(57.1% 0.221 330.3);
Tailwind
colors: {
  custom: {
    50: '#d377ca',
    500: '#ba31b3',
    950: '#000000',
  },
}
SCSS
$custom: #ba31b3;
$custom-light: #d377ca;
$custom-dark: #000000;
JSON
{
  "hex": "#ba31b3",
  "rgb": {
    "r": 186,
    "g": 49,
    "b": 179
  },
  "hsl": {
    "h": 303.066,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.57085,
    "c": 0.22091,
    "h": 330.3
  },
  "luminance": 0.1589
}

Semantic roles & 50–950 ramp

primary
#BA31B3
secondary
#7EC982
accent
#E24E46
background
#FDF7FC
surface
#FAEEF8
border
#D3C9D1
text
#150A13
muted
#837C82

Preview Lab

Preview with #BA31B3

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

Preview Lab → · Contrast checker → · Palette generator →

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