#5A31C8#5A31C8

#5A31C8 is a mid, highly saturated violet. Relative luminance 0.085; OKLCH L 46.5% C 0.216 H 287.1°. Best body text is #FFFFFF at 7.75:1 contrast (WCAG AA passes).

Color values

HEX#5A31C8
RGBrgb(90, 49, 200)
HSLhsl(256, 61%, 49%)
HSVhsv(256, 76%, 78%)
CMYKcmyk(55%, 75.5%, 0%, 21.6%)
CIE-LABlab(35.08, 54.37, -71.64)
CIE-LCHlch(35.08, 89.94, 307.20°)
OKLaboklab(46.47% 0.0634 -0.2062)
OKLCHoklch(46.47% 0.216 287.1)
XYZxyz(15.7370, 8.5396, 55.4515)
Luminance0.0854 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A31C8 #9FC831
analogous
#3154C8 #5A31C8 #A631C8
triadic
#5A31C8 #C85A31 #31C85A
tetradic
#5A31C8 #C83154 #9FC831 #31C8A6
square
#5A31C8 #C83154 #9FC831 #31C8A6
split-complementary
#5A31C8 #C8A631 #54C831
monochromatic
#2E1966 #442597 #5A31C8 #7F5FD8 #A690E4

Accessibility & contrast

On white

7.75
#5A31C8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.71
#5A31C8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A31C8
7.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A31C8#FFFFFF#000000##FFFFFF
##5A31C81.007.752.717.75
#FFFFFF7.751.0021.001.00
#0000002.7121.001.0021.00
##FFFFFF7.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0056CC
Deuteranopia (green-blind)
#004EC5
Tritanopia (blue-blind)
#2A5C7B
Achromatopsia (no color)
#525252

Design tokens & code

CSS
--color: #5a31c8;
/* rgb */ color: rgb(90, 49, 200);
/* oklch */ color: oklch(46.5% 0.216 287.1);
Tailwind
colors: {
  custom: {
    50: '#946eda',
    500: '#5a31c8',
    950: '#000000',
  },
}
SCSS
$custom: #5a31c8;
$custom-light: #946eda;
$custom-dark: #000000;
JSON
{
  "hex": "#5a31c8",
  "rgb": {
    "r": 90,
    "g": 49,
    "b": 200
  },
  "hsl": {
    "h": 256.291,
    "s": 60.643,
    "l": 48.824
  },
  "oklch": {
    "l": 0.46471,
    "c": 0.21571,
    "h": 287.1
  },
  "luminance": 0.0854
}

Semantic roles & 50–950 ramp

primary
#5A31C8
secondary
#BBCE86
accent
#E444B8
background
#F9F6FD
surface
#F2ECFB
border
#CCC7D4
text
#0E0715
muted
#7E7A83

Preview Lab

Preview with #5A31C8

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

Preview Lab → · Contrast checker → · Palette generator →

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