#5E31B6#5E31B6

#5E31B6 is a mid, vivid violet. Relative luminance 0.080; OKLCH L 45.2% C 0.195 H 292.2°. Best body text is #FFFFFF at 8.11:1 contrast (WCAG AA passes).

Color values

HEX#5E31B6
RGBrgb(94, 49, 182)
HSLhsl(260, 58%, 45%)
HSVhsv(260, 73%, 71%)
CMYKcmyk(48.4%, 73.1%, 0%, 28.6%)
CIE-LABlab(33.89, 50.01, -63.01)
CIE-LCHlch(33.89, 80.44, 308.44°)
OKLaboklab(45.23% 0.0738 -0.1807)
OKLCHoklch(45.23% 0.195 292.2)
XYZxyz(14.1555, 7.9532, 45.0362)
Luminance0.0795 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5E31B6 #89B631
analogous
#3146B6 #5E31B6 #A131B6
triadic
#5E31B6 #B65E31 #31B65E
tetradic
#5E31B6 #B63146 #89B631 #31B6A1
square
#5E31B6 #B63146 #89B631 #31B6A1
split-complementary
#5E31B6 #B6A131 #46B631
monochromatic
#2C1756 #452486 #5E31B6 #7E53D1 #A284DE

Accessibility & contrast

On white

8.11
#5E31B6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.59
#5E31B6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5E31B6
8.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5E31B6#FFFFFF#000000##FFFFFF
##5E31B61.008.112.598.11
#FFFFFF8.111.0021.001.00
#0000002.5921.001.0021.00
##FFFFFF8.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052BA
Deuteranopia (green-blind)
#004DB3
Tritanopia (blue-blind)
#425471
Achromatopsia (no color)
#505050

Design tokens & code

CSS
--color: #5e31b6;
/* rgb */ color: rgb(94, 49, 182);
/* oklch */ color: oklch(45.2% 0.195 292.2);
Tailwind
colors: {
  custom: {
    50: '#946dcd',
    500: '#5e31b6',
    950: '#000000',
  },
}
SCSS
$custom: #5e31b6;
$custom-light: #946dcd;
$custom-dark: #000000;
JSON
{
  "hex": "#5e31b6",
  "rgb": {
    "r": 94,
    "g": 49,
    "b": 182
  },
  "hsl": {
    "h": 260.301,
    "s": 57.576,
    "l": 45.294
  },
  "oklch": {
    "l": 0.45232,
    "c": 0.19521,
    "h": 292.2
  },
  "luminance": 0.07954
}

Semantic roles & 50–950 ramp

primary
#5E31B6
secondary
#AEC77C
accent
#E147AD
background
#F9F6FC
surface
#F2ECF9
border
#CCC7D2
text
#0E0714
muted
#7E7A82

Preview Lab

Preview with #5E31B6

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

Preview Lab → · Contrast checker → · Palette generator →

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