#5A31BC#5A31BC

#5A31BC is a mid, highly saturated violet. Relative luminance 0.080; OKLCH L 45.4% C 0.202 H 289.2°. Best body text is #FFFFFF at 8.08:1 contrast (WCAG AA passes).

Color values

HEX#5A31BC
RGBrgb(90, 49, 188)
HSLhsl(258, 59%, 46%)
HSVhsv(258, 74%, 74%)
CMYKcmyk(52.1%, 73.9%, 0%, 26.3%)
CIE-LABlab(33.98, 51.03, -66.41)
CIE-LCHlch(33.98, 83.75, 307.54°)
OKLaboklab(45.36% 0.0665 -0.1908)
OKLCHoklch(45.36% 0.202 289.2)
XYZxyz(14.3892, 8.0005, 48.3533)
Luminance0.0800 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A31BC #93BC31
analogous
#314EBC #5A31BC #A031BC
triadic
#5A31BC #BC5A31 #31BC5A
tetradic
#5A31BC #BC314E #93BC31 #31BCA0
square
#5A31BC #BC314E #93BC31 #31BCA0
split-complementary
#5A31BC #BCA031 #4EBC31
monochromatic
#2C185B #43248B #5A31BC #7C57D3 #A288E0

Accessibility & contrast

On white

8.08
#5A31BC on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.60
#5A31BC on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A31BC
8.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A31BC#FFFFFF#000000##FFFFFF
##5A31BC1.008.082.608.08
#FFFFFF8.081.0021.001.00
#0000002.6021.001.0021.00
##FFFFFF8.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053C0
Deuteranopia (green-blind)
#004CB9
Tritanopia (blue-blind)
#355774
Achromatopsia (no color)
#505050

Design tokens & code

CSS
--color: #5a31bc;
/* rgb */ color: rgb(90, 49, 188);
/* oklch */ color: oklch(45.4% 0.202 289.2);
Tailwind
colors: {
  custom: {
    50: '#926dd1',
    500: '#5a31bc',
    950: '#000000',
  },
}
SCSS
$custom: #5a31bc;
$custom-light: #926dd1;
$custom-dark: #000000;
JSON
{
  "hex": "#5a31bc",
  "rgb": {
    "r": 90,
    "g": 49,
    "b": 188
  },
  "hsl": {
    "h": 257.698,
    "s": 58.65,
    "l": 46.471
  },
  "oklch": {
    "l": 0.45364,
    "c": 0.20209,
    "h": 289.2
  },
  "luminance": 0.08001
}

Semantic roles & 50–950 ramp

primary
#5A31BC
secondary
#B4CA7F
accent
#E246B4
background
#F9F6FD
surface
#F2ECFA
border
#CCC7D3
text
#0E0714
muted
#7E7A83

Preview Lab

Preview with #5A31BC

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

Preview Lab → · Contrast checker → · Palette generator →

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