#5B31B8#5B31B8

#5B31B8 is a mid, vivid violet. Relative luminance 0.079; OKLCH L 45.1% C 0.197 H 290.4°. Best body text is #FFFFFF at 8.15:1 contrast (WCAG AA passes).

Color values

HEX#5B31B8
RGBrgb(91, 49, 184)
HSLhsl(259, 58%, 46%)
HSVhsv(259, 73%, 72%)
CMYKcmyk(50.5%, 73.4%, 0%, 27.8%)
CIE-LABlab(33.73, 50.08, -64.45)
CIE-LCHlch(33.73, 81.62, 307.85°)
OKLaboklab(45.1% 0.0689 -0.1851)
OKLCHoklch(45.1% 0.197 290.4)
XYZxyz(14.0619, 7.8809, 46.1183)
Luminance0.0788 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B31B8 #8EB831
analogous
#314AB8 #5B31B8 #9E31B8
triadic
#5B31B8 #B85B31 #31B85B
tetradic
#5B31B8 #B8314A #8EB831 #31B89E
square
#5B31B8 #B8314A #8EB831 #31B89E
split-complementary
#5B31B8 #B89E31 #4AB831
monochromatic
#2B1757 #432488 #5B31B8 #7B55D2 #A185DE

Accessibility & contrast

On white

8.15
#5B31B8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.58
#5B31B8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B31B8
8.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B31B8#FFFFFF#000000##FFFFFF
##5B31B81.008.152.588.15
#FFFFFF8.151.0021.001.00
#0000002.5821.001.0021.00
##FFFFFF8.151.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052BC
Deuteranopia (green-blind)
#004CB5
Tritanopia (blue-blind)
#3B5572
Achromatopsia (no color)
#4F4F4F

Design tokens & code

CSS
--color: #5b31b8;
/* rgb */ color: rgb(91, 49, 184);
/* oklch */ color: oklch(45.1% 0.197 290.4);
Tailwind
colors: {
  custom: {
    50: '#926dce',
    500: '#5b31b8',
    950: '#000000',
  },
}
SCSS
$custom: #5b31b8;
$custom-light: #926dce;
$custom-dark: #000000;
JSON
{
  "hex": "#5b31b8",
  "rgb": {
    "r": 91,
    "g": 49,
    "b": 184
  },
  "hsl": {
    "h": 258.667,
    "s": 57.94,
    "l": 45.686
  },
  "oklch": {
    "l": 0.45103,
    "c": 0.19749,
    "h": 290.4
  },
  "luminance": 0.07881
}

Semantic roles & 50–950 ramp

primary
#5B31B8
secondary
#B1C87D
accent
#E147B1
background
#F9F6FC
surface
#F2ECF9
border
#CCC7D2
text
#0E0714
muted
#7E7A82

Preview Lab

Preview with #5B31B8

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

Preview Lab → · Contrast checker → · Palette generator →

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