#5B31DC#5B31DC

#5B31DC is a mid, highly saturated violet. Relative luminance 0.096; OKLCH L 48.5% C 0.238 H 284.5°. Best body text is #FFFFFF at 7.20:1 contrast (WCAG AA passes).

Color values

HEX#5B31DC
RGBrgb(91, 49, 220)
HSLhsl(255, 71%, 53%)
HSVhsv(255, 78%, 86%)
CMYKcmyk(58.6%, 77.7%, 0%, 13.7%)
CIE-LABlab(37.09, 60.02, -79.90)
CIE-LCHlch(37.09, 99.94, 306.91°)
OKLaboklab(48.47% 0.0594 -0.2303)
OKLCHoklch(48.47% 0.238 284.5)
XYZxyz(18.3270, 9.5869, 68.5810)
Luminance0.0959 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B31DC #B2DC31
analogous
#315CDC #5B31DC #B131DC
triadic
#5B31DC #DC5B31 #31DC5B
tetradic
#5B31DC #DC315C #B2DC31 #31DCB1
square
#5B31DC #DC315C #B2DC31 #31DCB1
split-complementary
#5B31DC #DCB131 #5CDC31
monochromatic
#2F157D #421EB2 #5B31DC #8565E5 #AE9AEE

Accessibility & contrast

On white

7.20
#5B31DC on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.92
#5B31DC on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B31DC
7.20:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B31DC#FFFFFF#000000##FFFFFF
##5B31DC1.007.202.927.20
#FFFFFF7.201.0021.001.00
#0000002.9221.001.0021.00
##FFFFFF7.201.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005CE1
Deuteranopia (green-blind)
#0052D9
Tritanopia (blue-blind)
#036386
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #5b31dc;
/* rgb */ color: rgb(91, 49, 220);
/* oklch */ color: oklch(48.5% 0.238 284.5);
Tailwind
colors: {
  custom: {
    50: '#986fe8',
    500: '#5b31dc',
    950: '#000000',
  },
}
SCSS
$custom: #5b31dc;
$custom-light: #986fe8;
$custom-dark: #000000;
JSON
{
  "hex": "#5b31dc",
  "rgb": {
    "r": 91,
    "g": 49,
    "b": 220
  },
  "hsl": {
    "h": 254.737,
    "s": 70.954,
    "l": 52.745
  },
  "oklch": {
    "l": 0.48472,
    "c": 0.23781,
    "h": 284.5
  },
  "luminance": 0.09588
}

Semantic roles & 50–950 ramp

primary
#5B31DC
secondary
#C7D98F
accent
#EE3AC2
background
#FAF6FE
surface
#F4ECFD
border
#CEC7D5
text
#0F0816
muted
#7F7B84

Preview Lab

Preview with #5B31DC

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

Preview Lab → · Contrast checker → · Palette generator →

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