#5B31D4#5B31D4

#5B31D4 is a mid, highly saturated violet. Relative luminance 0.092; OKLCH L 47.7% C 0.229 H 285.6°. Best body text is #FFFFFF at 7.41:1 contrast (WCAG AA passes).

Color values

HEX#5B31D4
RGBrgb(91, 49, 212)
HSLhsl(255, 65%, 51%)
HSVhsv(255, 77%, 83%)
CMYKcmyk(57.1%, 76.9%, 0%, 16.9%)
CIE-LABlab(36.32, 57.82, -76.58)
CIE-LCHlch(36.32, 95.95, 307.06°)
OKLaboklab(47.7% 0.0616 -0.2206)
OKLCHoklch(47.7% 0.229 285.6)
XYZxyz(17.2928, 9.1732, 63.1340)
Luminance0.0917 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B31D4 #AAD431
analogous
#3158D4 #5B31D4 #AC31D4
triadic
#5B31D4 #D45B31 #31D45B
tetradic
#5B31D4 #D43158 #AAD431 #31D4AC
square
#5B31D4 #D43158 #AAD431 #31D4AC
split-complementary
#5B31D4 #D4AC31 #58D431
monochromatic
#2F1873 #4423A5 #5B31D4 #8364DF #AC96E9

Accessibility & contrast

On white

7.41
#5B31D4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.83
#5B31D4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B31D4
7.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B31D4#FFFFFF#000000##FFFFFF
##5B31D41.007.412.837.41
#FFFFFF7.411.0021.001.00
#0000002.8321.001.0021.00
##FFFFFF7.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AD9
Deuteranopia (green-blind)
#0050D1
Tritanopia (blue-blind)
#1C6082
Achromatopsia (no color)
#555555

Design tokens & code

CSS
--color: #5b31d4;
/* rgb */ color: rgb(91, 49, 212);
/* oklch */ color: oklch(47.7% 0.229 285.6);
Tailwind
colors: {
  custom: {
    50: '#976fe3',
    500: '#5b31d4',
    950: '#000000',
  },
}
SCSS
$custom: #5b31d4;
$custom-light: #976fe3;
$custom-dark: #000000;
JSON
{
  "hex": "#5b31d4",
  "rgb": {
    "r": 91,
    "g": 49,
    "b": 212
  },
  "hsl": {
    "h": 255.46,
    "s": 65.462,
    "l": 51.176
  },
  "oklch": {
    "l": 0.47699,
    "c": 0.22901,
    "h": 285.6
  },
  "luminance": 0.09174
}

Semantic roles & 50–950 ramp

primary
#5B31D4
secondary
#C2D48C
accent
#E83FBD
background
#FAF6FE
surface
#F3ECFC
border
#CDC7D5
text
#0F0816
muted
#7F7B84

Preview Lab

Preview with #5B31D4

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

Preview Lab → · Contrast checker → · Palette generator →

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