#5B31AF#5B31AF

#5B31AF is a dark, vivid violet. Relative luminance 0.075; OKLCH L 44.3% C 0.187 H 292.3°. Best body text is #FFFFFF at 8.39:1 contrast (WCAG AA passes).

Color values

HEX#5B31AF
RGBrgb(91, 49, 175)
HSLhsl(260, 56%, 44%)
HSVhsv(260, 72%, 69%)
CMYKcmyk(48%, 72%, 0%, 31.4%)
CIE-LABlab(32.95, 47.59, -60.38)
CIE-LCHlch(32.95, 76.88, 308.24°)
OKLaboklab(44.31% 0.0709 -0.1731)
OKLCHoklch(44.31% 0.187 292.3)
XYZxyz(13.1484, 7.5155, 41.3070)
Luminance0.0752 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B31AF #85AF31
analogous
#3146AF #5B31AF #9A31AF
triadic
#5B31AF #AF5B31 #31AF5B
tetradic
#5B31AF #AF3146 #85AF31 #31AF9A
square
#5B31AF #AF3146 #85AF31 #31AF9A
split-complementary
#5B31AF #AF9A31 #46AF31
monochromatic
#29164F #42247F #5B31AF #7A4FCE #9E7FDB

Accessibility & contrast

On white

8.39
#5B31AF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.50
#5B31AF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B31AF
8.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B31AF#FFFFFF#000000##FFFFFF
##5B31AF1.008.392.508.39
#FFFFFF8.391.0021.001.00
#0000002.5021.001.0021.00
##FFFFFF8.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004FB3
Deuteranopia (green-blind)
#004BAD
Tritanopia (blue-blind)
#41526D
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #5b31af;
/* rgb */ color: rgb(91, 49, 175);
/* oklch */ color: oklch(44.3% 0.187 292.3);
Tailwind
colors: {
  custom: {
    50: '#916dc8',
    500: '#5b31af',
    950: '#000000',
  },
}
SCSS
$custom: #5b31af;
$custom-light: #916dc8;
$custom-dark: #000000;
JSON
{
  "hex": "#5b31af",
  "rgb": {
    "r": 91,
    "g": 49,
    "b": 175
  },
  "hsl": {
    "h": 260,
    "s": 56.25,
    "l": 43.922
  },
  "oklch": {
    "l": 0.4431,
    "c": 0.18709,
    "h": 292.3
  },
  "luminance": 0.07516
}

Semantic roles & 50–950 ramp

primary
#5B31AF
secondary
#ABC478
accent
#E048AD
background
#F9F6FC
surface
#F2ECF8
border
#CCC7D1
text
#0E0713
muted
#7E7A82

Preview Lab

Preview with #5B31AF

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

Preview Lab → · Contrast checker → · Palette generator →

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