#5B31BC#5B31BC

#5B31BC is a mid, highly saturated violet. Relative luminance 0.081; OKLCH L 45.5% C 0.202 H 289.7°. Best body text is #FFFFFF at 8.04:1 contrast (WCAG AA passes).

Color values

HEX#5B31BC
RGBrgb(91, 49, 188)
HSLhsl(258, 59%, 46%)
HSVhsv(258, 74%, 74%)
CMYKcmyk(51.6%, 73.9%, 0%, 26.3%)
CIE-LABlab(34.09, 51.19, -66.23)
CIE-LCHlch(34.09, 83.71, 307.70°)
OKLaboklab(45.46% 0.068 -0.1903)
OKLCHoklch(45.46% 0.202 289.7)
XYZxyz(14.4872, 8.0510, 48.3579)
Luminance0.0805 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B31BC #92BC31
analogous
#314DBC #5B31BC #A131BC
triadic
#5B31BC #BC5B31 #31BC5B
tetradic
#5B31BC #BC314D #92BC31 #31BCA1
square
#5B31BC #BC314D #92BC31 #31BCA1
split-complementary
#5B31BC #BCA131 #4DBC31
monochromatic
#2C185B #44248B #5B31BC #7D57D3 #A288E0

Accessibility & contrast

On white

8.04
#5B31BC on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.61
#5B31BC on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B31BC
8.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B31BC#FFFFFF#000000##FFFFFF
##5B31BC1.008.042.618.04
#FFFFFF8.041.0021.001.00
#0000002.6121.001.0021.00
##FFFFFF8.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053C0
Deuteranopia (green-blind)
#004DB9
Tritanopia (blue-blind)
#385774
Achromatopsia (no color)
#505050

Design tokens & code

CSS
--color: #5b31bc;
/* rgb */ color: rgb(91, 49, 188);
/* oklch */ color: oklch(45.5% 0.202 289.7);
Tailwind
colors: {
  custom: {
    50: '#936dd1',
    500: '#5b31bc',
    950: '#000000',
  },
}
SCSS
$custom: #5b31bc;
$custom-light: #936dd1;
$custom-dark: #000000;
JSON
{
  "hex": "#5b31bc",
  "rgb": {
    "r": 91,
    "g": 49,
    "b": 188
  },
  "hsl": {
    "h": 258.129,
    "s": 58.65,
    "l": 46.471
  },
  "oklch": {
    "l": 0.45462,
    "c": 0.20206,
    "h": 289.7
  },
  "luminance": 0.08052
}

Semantic roles & 50–950 ramp

primary
#5B31BC
secondary
#B3CA7F
accent
#E246B3
background
#F9F6FD
surface
#F2ECFA
border
#CCC7D3
text
#0E0714
muted
#7E7A83

Preview Lab

Preview with #5B31BC

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

Preview Lab → · Contrast checker → · Palette generator →

#5B31BC Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva