#5D31A2#5D31A2

#5D31A2 is a dark, vivid violet. Relative luminance 0.071; OKLCH L 43.4% C 0.172 H 296.3°. Best body text is #FFFFFF at 8.65:1 contrast (WCAG AA passes).

Color values

HEX#5D31A2
RGBrgb(93, 49, 162)
HSLhsl(263, 54%, 41%)
HSVhsv(263, 70%, 64%)
CMYKcmyk(42.6%, 69.8%, 0%, 36.5%)
CIE-LABlab(32.11, 44.40, -53.95)
CIE-LCHlch(32.11, 69.87, 309.45°)
OKLaboklab(43.43% 0.0763 -0.1542)
OKLCHoklch(43.43% 0.172 296.3)
XYZxyz(12.1324, 7.1322, 34.9128)
Luminance0.0713 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5D31A2 #76A231
analogous
#313DA2 #5D31A2 #9631A2
triadic
#5D31A2 #A25D31 #31A25D
tetradic
#5D31A2 #A2313D #76A231 #31A296
square
#5D31A2 #A2313D #76A231 #31A296
split-complementary
#5D31A2 #A29631 #3DA231
monochromatic
#271544 #422373 #5D31A2 #7A48C8 #9C77D6

Accessibility & contrast

On white

8.65
#5D31A2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.43
#5D31A2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5D31A2
8.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5D31A2#FFFFFF#000000##FFFFFF
##5D31A21.008.652.438.65
#FFFFFF8.651.0021.001.00
#0000002.4321.001.0021.00
##FFFFFF8.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CA5
Deuteranopia (green-blind)
#004AA0
Tritanopia (blue-blind)
#4B4D66
Achromatopsia (no color)
#4C4C4C

Design tokens & code

CSS
--color: #5d31a2;
/* rgb */ color: rgb(93, 49, 162);
/* oklch */ color: oklch(43.4% 0.172 296.3);
Tailwind
colors: {
  custom: {
    50: '#916cbe',
    500: '#5d31a2',
    950: '#000000',
  },
}
SCSS
$custom: #5d31a2;
$custom-light: #916cbe;
$custom-dark: #000000;
JSON
{
  "hex": "#5d31a2",
  "rgb": {
    "r": 93,
    "g": 49,
    "b": 162
  },
  "hsl": {
    "h": 263.363,
    "s": 53.555,
    "l": 41.373
  },
  "oklch": {
    "l": 0.43425,
    "c": 0.17201,
    "h": 296.3
  },
  "luminance": 0.07132
}

Semantic roles & 50–950 ramp

primary
#5D31A2
secondary
#A0BE71
accent
#DD4BA4
background
#F9F6FB
surface
#F2ECF7
border
#CCC7D0
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5D31A2

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

Preview Lab → · Contrast checker → · Palette generator →

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