#5A31BA#5A31BA

#5A31BA is a mid, vivid violet. Relative luminance 0.079; OKLCH L 45.2% C 0.200 H 289.6°. Best body text is #FFFFFF at 8.13:1 contrast (WCAG AA passes).

Color values

HEX#5A31BA
RGBrgb(90, 49, 186)
HSLhsl(258, 58%, 46%)
HSVhsv(258, 74%, 73%)
CMYKcmyk(51.6%, 73.7%, 0%, 27.1%)
CIE-LABlab(33.80, 50.48, -65.52)
CIE-LCHlch(33.80, 82.71, 307.61°)
OKLaboklab(45.18% 0.067 -0.1882)
OKLCHoklch(45.18% 0.2 289.6)
XYZxyz(14.1751, 7.9148, 47.2257)
Luminance0.0791 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A31BA #91BA31
analogous
#314CBA #5A31BA #9E31BA
triadic
#5A31BA #BA5A31 #31BA5A
tetradic
#5A31BA #BA314C #91BA31 #31BA9E
square
#5A31BA #BA314C #91BA31 #31BA9E
split-complementary
#5A31BA #BA9E31 #4CBA31
monochromatic
#2B1759 #43248A #5A31BA #7B56D2 #A186DF

Accessibility & contrast

On white

8.13
#5A31BA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.58
#5A31BA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A31BA
8.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A31BA#FFFFFF#000000##FFFFFF
##5A31BA1.008.132.588.13
#FFFFFF8.131.0021.001.00
#0000002.5821.001.0021.00
##FFFFFF8.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0052BE
Deuteranopia (green-blind)
#004CB7
Tritanopia (blue-blind)
#375673
Achromatopsia (no color)
#4F4F4F

Design tokens & code

CSS
--color: #5a31ba;
/* rgb */ color: rgb(90, 49, 186);
/* oklch */ color: oklch(45.2% 0.200 289.6);
Tailwind
colors: {
  custom: {
    50: '#926dd0',
    500: '#5a31ba',
    950: '#000000',
  },
}
SCSS
$custom: #5a31ba;
$custom-light: #926dd0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a31ba",
  "rgb": {
    "r": 90,
    "g": 49,
    "b": 186
  },
  "hsl": {
    "h": 257.956,
    "s": 58.298,
    "l": 46.078
  },
  "oklch": {
    "l": 0.45183,
    "c": 0.19979,
    "h": 289.6
  },
  "luminance": 0.07915
}

Semantic roles & 50–950 ramp

primary
#5A31BA
secondary
#B2C97E
accent
#E246B3
background
#F9F6FC
surface
#F2ECF9
border
#CCC7D2
text
#0E0714
muted
#7E7A82

Preview Lab

Preview with #5A31BA

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

Preview Lab → · Contrast checker → · Palette generator →

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