#5D31C2#5D31C2

#5D31C2 is a mid, highly saturated violet. Relative luminance 0.084; OKLCH L 46.2% C 0.209 H 289.4°. Best body text is #FFFFFF at 7.82:1 contrast (WCAG AA passes).

Color values

HEX#5D31C2
RGBrgb(93, 49, 194)
HSLhsl(258, 60%, 48%)
HSVhsv(258, 75%, 76%)
CMYKcmyk(52.1%, 74.7%, 0%, 23.9%)
CIE-LABlab(34.84, 53.14, -68.52)
CIE-LCHlch(34.84, 86.71, 307.79°)
OKLaboklab(46.21% 0.0694 -0.1969)
OKLCHoklch(46.21% 0.209 289.4)
XYZxyz(15.3473, 8.4181, 51.8447)
Luminance0.0842 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5D31C2 #96C231
analogous
#314DC2 #5D31C2 #A631C2
triadic
#5D31C2 #C25D31 #31C25D
tetradic
#5D31C2 #C2314D #96C231 #31C2A6
square
#5D31C2 #C2314D #96C231 #31C2A6
split-complementary
#5D31C2 #C2A631 #4DC231
monochromatic
#2E1860 #462591 #5D31C2 #805BD6 #A68CE2

Accessibility & contrast

On white

7.82
#5D31C2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.68
#5D31C2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5D31C2
7.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5D31C2#FFFFFF#000000##FFFFFF
##5D31C21.007.822.687.82
#FFFFFF7.821.0021.001.00
#0000002.6821.001.0021.00
##FFFFFF7.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0055C6
Deuteranopia (green-blind)
#004EBF
Tritanopia (blue-blind)
#375977
Achromatopsia (no color)
#525252

Design tokens & code

CSS
--color: #5d31c2;
/* rgb */ color: rgb(93, 49, 194);
/* oklch */ color: oklch(46.2% 0.209 289.4);
Tailwind
colors: {
  custom: {
    50: '#956ed6',
    500: '#5d31c2',
    950: '#000000',
  },
}
SCSS
$custom: #5d31c2;
$custom-light: #956ed6;
$custom-dark: #000000;
JSON
{
  "hex": "#5d31c2",
  "rgb": {
    "r": 93,
    "g": 49,
    "b": 194
  },
  "hsl": {
    "h": 258.207,
    "s": 59.671,
    "l": 47.647
  },
  "oklch": {
    "l": 0.46205,
    "c": 0.20881,
    "h": 289.4
  },
  "luminance": 0.08419
}

Semantic roles & 50–950 ramp

primary
#5D31C2
secondary
#B6CC83
accent
#E345B3
background
#F9F6FD
surface
#F2ECFA
border
#CCC7D3
text
#0E0714
muted
#7E7A83

Preview Lab

Preview with #5D31C2

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

Preview Lab → · Contrast checker → · Palette generator →

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