#5B31AB#5B31AB

#5B31AB is a dark, vivid violet. Relative luminance 0.074; OKLCH L 44.0% C 0.182 H 293.1°. Best body text is #FFFFFF at 8.49:1 contrast (WCAG AA passes).

Color values

HEX#5B31AB
RGBrgb(91, 49, 171)
HSLhsl(261, 55%, 43%)
HSVhsv(261, 71%, 67%)
CMYKcmyk(46.8%, 71.3%, 0%, 32.9%)
CIE-LABlab(32.61, 46.49, -58.54)
CIE-LCHlch(32.61, 74.75, 308.45°)
OKLaboklab(43.96% 0.0717 -0.1677)
OKLCHoklch(43.96% 0.182 293.1)
XYZxyz(12.7614, 7.3606, 39.2685)
Luminance0.0736 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B31AB #81AB31
analogous
#3144AB #5B31AB #9831AB
triadic
#5B31AB #AB5B31 #31AB5B
tetradic
#5B31AB #AB3144 #81AB31 #31AB98
square
#5B31AB #AB3144 #81AB31 #31AB98
split-complementary
#5B31AB #AB9831 #44AB31
monochromatic
#28164C #42237B #5B31AB #794DCC #9D7DDA

Accessibility & contrast

On white

8.49
#5B31AB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.47
#5B31AB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B31AB
8.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B31AB#FFFFFF#000000##FFFFFF
##5B31AB1.008.492.478.49
#FFFFFF8.491.0021.001.00
#0000002.4721.001.0021.00
##FFFFFF8.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004EAF
Deuteranopia (green-blind)
#004AA9
Tritanopia (blue-blind)
#43506A
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #5b31ab;
/* rgb */ color: rgb(91, 49, 171);
/* oklch */ color: oklch(44.0% 0.182 293.1);
Tailwind
colors: {
  custom: {
    50: '#916dc5',
    500: '#5b31ab',
    950: '#000000',
  },
}
SCSS
$custom: #5b31ab;
$custom-light: #916dc5;
$custom-dark: #000000;
JSON
{
  "hex": "#5b31ab",
  "rgb": {
    "r": 91,
    "g": 49,
    "b": 171
  },
  "hsl": {
    "h": 260.656,
    "s": 55.455,
    "l": 43.137
  },
  "oklch": {
    "l": 0.43964,
    "c": 0.18243,
    "h": 293.1
  },
  "luminance": 0.07361
}

Semantic roles & 50–950 ramp

primary
#5B31AB
secondary
#A8C275
accent
#DF49AB
background
#F9F6FC
surface
#F2ECF8
border
#CCC7D1
text
#0D0713
muted
#7E7A82

Preview Lab

Preview with #5B31AB

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

Preview Lab → · Contrast checker → · Palette generator →

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