#5A31C2#5A31C2

#5A31C2 is a mid, highly saturated violet. Relative luminance 0.083; OKLCH L 45.9% C 0.209 H 288.1°. Best body text is #FFFFFF at 7.92:1 contrast (WCAG AA passes).

Color values

HEX#5A31C2
RGBrgb(90, 49, 194)
HSLhsl(257, 60%, 48%)
HSVhsv(257, 75%, 76%)
CMYKcmyk(53.6%, 74.7%, 0%, 23.9%)
CIE-LABlab(34.53, 52.71, -69.04)
CIE-LCHlch(34.53, 86.86, 307.36°)
OKLaboklab(45.91% 0.065 -0.1986)
OKLCHoklch(45.91% 0.209 288.1)
XYZxyz(15.0495, 8.2646, 51.8307)
Luminance0.0827 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A31C2 #99C231
analogous
#3150C2 #5A31C2 #A331C2
triadic
#5A31C2 #C25A31 #31C25A
tetradic
#5A31C2 #C23150 #99C231 #31C2A3
square
#5A31C2 #C23150 #99C231 #31C2A3
split-complementary
#5A31C2 #C2A331 #50C231
monochromatic
#2D1860 #432591 #5A31C2 #7D5BD6 #A48CE2

Accessibility & contrast

On white

7.92
#5A31C2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.65
#5A31C2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A31C2
7.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A31C2#FFFFFF#000000##FFFFFF
##5A31C21.007.922.657.92
#FFFFFF7.921.0021.001.00
#0000002.6521.001.0021.00
##FFFFFF7.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054C6
Deuteranopia (green-blind)
#004DBF
Tritanopia (blue-blind)
#305977
Achromatopsia (no color)
#515151

Design tokens & code

CSS
--color: #5a31c2;
/* rgb */ color: rgb(90, 49, 194);
/* oklch */ color: oklch(45.9% 0.209 288.1);
Tailwind
colors: {
  custom: {
    50: '#936ed6',
    500: '#5a31c2',
    950: '#000000',
  },
}
SCSS
$custom: #5a31c2;
$custom-light: #936ed6;
$custom-dark: #000000;
JSON
{
  "hex": "#5a31c2",
  "rgb": {
    "r": 90,
    "g": 49,
    "b": 194
  },
  "hsl": {
    "h": 256.966,
    "s": 59.671,
    "l": 47.647
  },
  "oklch": {
    "l": 0.45913,
    "c": 0.20893,
    "h": 288.1
  },
  "luminance": 0.08265
}

Semantic roles & 50–950 ramp

primary
#5A31C2
secondary
#B7CC83
accent
#E345B6
background
#F9F6FD
surface
#F2ECFA
border
#CCC7D3
text
#0E0714
muted
#7E7A83

Preview Lab

Preview with #5A31C2

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

Preview Lab → · Contrast checker → · Palette generator →

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