#5B31C7#5B31C7

#5B31C7 is a mid, highly saturated violet. Relative luminance 0.085; OKLCH L 46.5% C 0.215 H 287.7°. Best body text is #FFFFFF at 7.75:1 contrast (WCAG AA passes).

Color values

HEX#5B31C7
RGBrgb(91, 49, 199)
HSLhsl(257, 60%, 49%)
HSVhsv(257, 75%, 78%)
CMYKcmyk(54.3%, 75.4%, 0%, 22%)
CIE-LABlab(35.09, 54.23, -71.04)
CIE-LCHlch(35.09, 89.38, 307.36°)
OKLaboklab(46.47% 0.0652 -0.2044)
OKLCHoklch(46.47% 0.215 287.7)
XYZxyz(15.7184, 8.5435, 54.8426)
Luminance0.0854 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B31C7 #9DC731
analogous
#3152C7 #5B31C7 #A631C7
triadic
#5B31C7 #C75B31 #31C75B
tetradic
#5B31C7 #C73152 #9DC731 #31C7A6
square
#5B31C7 #C73152 #9DC731 #31C7A6
split-complementary
#5B31C7 #C7A631 #52C731
monochromatic
#2E1965 #452596 #5B31C7 #805ED7 #A78FE3

Accessibility & contrast

On white

7.75
#5B31C7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.71
#5B31C7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B31C7
7.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B31C7#FFFFFF#000000##FFFFFF
##5B31C71.007.752.717.75
#FFFFFF7.751.0021.001.00
#0000002.7121.001.0021.00
##FFFFFF7.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0056CB
Deuteranopia (green-blind)
#004EC4
Tritanopia (blue-blind)
#2E5B7A
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #5b31c7;
/* rgb */ color: rgb(91, 49, 199);
/* oklch */ color: oklch(46.5% 0.215 287.7);
Tailwind
colors: {
  custom: {
    50: '#956ed9',
    500: '#5b31c7',
    950: '#000000',
  },
}
SCSS
$custom: #5b31c7;
$custom-light: #956ed9;
$custom-dark: #000000;
JSON
{
  "hex": "#5b31c7",
  "rgb": {
    "r": 91,
    "g": 49,
    "b": 199
  },
  "hsl": {
    "h": 256.8,
    "s": 60.484,
    "l": 48.627
  },
  "oklch": {
    "l": 0.46472,
    "c": 0.21452,
    "h": 287.7
  },
  "luminance": 0.08544
}

Semantic roles & 50–950 ramp

primary
#5B31C7
secondary
#BACE86
accent
#E444B7
background
#F9F6FD
surface
#F2ECFB
border
#CCC7D4
text
#0E0715
muted
#7E7A83

Preview Lab

Preview with #5B31C7

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

Preview Lab → · Contrast checker → · Palette generator →

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