#5E31B2#5E31B2

#5E31B2 is a dark, vivid violet. Relative luminance 0.078; OKLCH L 44.9% C 0.191 H 293.1°. Best body text is #FFFFFF at 8.21:1 contrast (WCAG AA passes).

Color values

HEX#5E31B2
RGBrgb(94, 49, 178)
HSLhsl(261, 57%, 45%)
HSVhsv(261, 72%, 70%)
CMYKcmyk(47.2%, 72.5%, 0%, 30.2%)
CIE-LABlab(33.54, 48.92, -61.19)
CIE-LCHlch(33.54, 78.34, 308.64°)
OKLaboklab(44.88% 0.0747 -0.1754)
OKLCHoklch(44.88% 0.191 293.1)
XYZxyz(13.7481, 7.7902, 42.8901)
Luminance0.0779 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5E31B2 #85B231
analogous
#3145B2 #5E31B2 #9F31B2
triadic
#5E31B2 #B25E31 #31B25E
tetradic
#5E31B2 #B23145 #85B231 #31B29F
square
#5E31B2 #B23145 #85B231 #31B29F
split-complementary
#5E31B2 #B29F31 #45B231
monochromatic
#2B1752 #452482 #5E31B2 #7D51CF #A181DC

Accessibility & contrast

On white

8.21
#5E31B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.56
#5E31B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5E31B2
8.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5E31B2#FFFFFF#000000##FFFFFF
##5E31B21.008.212.568.21
#FFFFFF8.211.0021.001.00
#0000002.5621.001.0021.00
##FFFFFF8.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0050B6
Deuteranopia (green-blind)
#004CAF
Tritanopia (blue-blind)
#44536E
Achromatopsia (no color)
#4F4F4F

Design tokens & code

CSS
--color: #5e31b2;
/* rgb */ color: rgb(94, 49, 178);
/* oklch */ color: oklch(44.9% 0.191 293.1);
Tailwind
colors: {
  custom: {
    50: '#936dca',
    500: '#5e31b2',
    950: '#000000',
  },
}
SCSS
$custom: #5e31b2;
$custom-light: #936dca;
$custom-dark: #000000;
JSON
{
  "hex": "#5e31b2",
  "rgb": {
    "r": 94,
    "g": 49,
    "b": 178
  },
  "hsl": {
    "h": 260.93,
    "s": 56.828,
    "l": 44.51
  },
  "oklch": {
    "l": 0.44883,
    "c": 0.19064,
    "h": 293.1
  },
  "luminance": 0.07791
}

Semantic roles & 50–950 ramp

primary
#5E31B2
secondary
#ABC579
accent
#E048AB
background
#F9F6FC
surface
#F2ECF8
border
#CCC7D1
text
#0E0713
muted
#7E7A82

Preview Lab

Preview with #5E31B2

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

Preview Lab → · Contrast checker → · Palette generator →

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