#5B31CA#5B31CA

#5B31CA is a mid, highly saturated violet. Relative luminance 0.087; OKLCH L 46.8% C 0.218 H 287.2°. Best body text is #FFFFFF at 7.67:1 contrast (WCAG AA passes).

Color values

HEX#5B31CA
RGBrgb(91, 49, 202)
HSLhsl(256, 61%, 49%)
HSVhsv(256, 76%, 79%)
CMYKcmyk(55%, 75.7%, 0%, 20.8%)
CIE-LABlab(35.37, 55.06, -72.33)
CIE-LCHlch(35.37, 90.91, 307.28°)
OKLaboklab(46.75% 0.0644 -0.2082)
OKLCHoklch(46.75% 0.218 287.2)
XYZxyz(16.0702, 8.6842, 56.6951)
Luminance0.0868 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B31CA #A0CA31
analogous
#3153CA #5B31CA #A831CA
triadic
#5B31CA #CA5B31 #31CA5B
tetradic
#5B31CA #CA3153 #A0CA31 #31CAA8
square
#5B31CA #CA3153 #A0CA31 #31CAA8
split-complementary
#5B31CA #CAA831 #53CA31
monochromatic
#2F1967 #452599 #5B31CA #8160D8 #A891E4

Accessibility & contrast

On white

7.67
#5B31CA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.74
#5B31CA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B31CA
7.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B31CA#FFFFFF#000000##FFFFFF
##5B31CA1.007.672.747.67
#FFFFFF7.671.0021.001.00
#0000002.7421.001.0021.00
##FFFFFF7.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057CE
Deuteranopia (green-blind)
#004FC7
Tritanopia (blue-blind)
#2A5C7C
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #5b31ca;
/* rgb */ color: rgb(91, 49, 202);
/* oklch */ color: oklch(46.8% 0.218 287.2);
Tailwind
colors: {
  custom: {
    50: '#956edb',
    500: '#5b31ca',
    950: '#000000',
  },
}
SCSS
$custom: #5b31ca;
$custom-light: #956edb;
$custom-dark: #000000;
JSON
{
  "hex": "#5b31ca",
  "rgb": {
    "r": 91,
    "g": 49,
    "b": 202
  },
  "hsl": {
    "h": 256.471,
    "s": 60.956,
    "l": 49.216
  },
  "oklch": {
    "l": 0.46752,
    "c": 0.21789,
    "h": 287.2
  },
  "luminance": 0.08685
}

Semantic roles & 50–950 ramp

primary
#5B31CA
secondary
#BBCF88
accent
#E444B8
background
#F9F6FD
surface
#F2ECFB
border
#CCC7D4
text
#0F0715
muted
#7E7A83

Preview Lab

Preview with #5B31CA

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

Preview Lab → · Contrast checker → · Palette generator →

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