#5A31CA#5A31CA

#5A31CA is a mid, highly saturated violet. Relative luminance 0.086; OKLCH L 46.7% C 0.218 H 286.8°. Best body text is #FFFFFF at 7.70:1 contrast (WCAG AA passes).

Color values

HEX#5A31CA
RGBrgb(90, 49, 202)
HSLhsl(256, 61%, 49%)
HSVhsv(256, 76%, 79%)
CMYKcmyk(55.4%, 75.7%, 0%, 20.8%)
CIE-LABlab(35.27, 54.93, -72.50)
CIE-LCHlch(35.27, 90.96, 307.15°)
OKLaboklab(46.66% 0.0629 -0.2087)
OKLCHoklch(46.66% 0.218 286.8)
XYZxyz(15.9722, 8.6337, 56.6905)
Luminance0.0863 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A31CA #A1CA31
analogous
#3155CA #5A31CA #A631CA
triadic
#5A31CA #CA5A31 #31CA5A
tetradic
#5A31CA #CA3155 #A1CA31 #31CAA6
square
#5A31CA #CA3155 #A1CA31 #31CAA6
split-complementary
#5A31CA #CAA631 #55CA31
monochromatic
#2E1967 #442599 #5A31CA #8060D8 #A791E4

Accessibility & contrast

On white

7.70
#5A31CA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.73
#5A31CA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A31CA
7.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A31CA#FFFFFF#000000##FFFFFF
##5A31CA1.007.702.737.70
#FFFFFF7.701.0021.001.00
#0000002.7321.001.0021.00
##FFFFFF7.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057CE
Deuteranopia (green-blind)
#004FC7
Tritanopia (blue-blind)
#275C7C
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #5a31ca;
/* rgb */ color: rgb(90, 49, 202);
/* oklch */ color: oklch(46.7% 0.218 286.8);
Tailwind
colors: {
  custom: {
    50: '#956edb',
    500: '#5a31ca',
    950: '#000000',
  },
}
SCSS
$custom: #5a31ca;
$custom-light: #956edb;
$custom-dark: #000000;
JSON
{
  "hex": "#5a31ca",
  "rgb": {
    "r": 90,
    "g": 49,
    "b": 202
  },
  "hsl": {
    "h": 256.078,
    "s": 60.956,
    "l": 49.216
  },
  "oklch": {
    "l": 0.46658,
    "c": 0.21796,
    "h": 286.8
  },
  "luminance": 0.08635
}

Semantic roles & 50–950 ramp

primary
#5A31CA
secondary
#BCCF88
accent
#E444B9
background
#F9F6FD
surface
#F2ECFB
border
#CCC7D4
text
#0E0715
muted
#7E7A83

Preview Lab

Preview with #5A31CA

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

Preview Lab → · Contrast checker → · Palette generator →

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