#5A31A4#5A31A4

#5A31A4 is a dark, vivid violet. Relative luminance 0.071; OKLCH L 43.3% C 0.174 H 294.3°. Best body text is #FFFFFF at 8.71:1 contrast (WCAG AA passes).

Color values

HEX#5A31A4
RGBrgb(90, 49, 164)
HSLhsl(261, 54%, 42%)
HSVhsv(261, 70%, 64%)
CMYKcmyk(45.1%, 70.1%, 0%, 35.7%)
CIE-LABlab(31.92, 44.37, -55.47)
CIE-LCHlch(31.92, 71.04, 308.66°)
OKLaboklab(43.26% 0.0716 -0.1587)
OKLCHoklch(43.26% 0.174 294.3)
XYZxyz(12.0138, 7.0503, 35.8426)
Luminance0.0705 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A31A4 #7BA431
analogous
#3142A4 #5A31A4 #9431A4
triadic
#5A31A4 #A45A31 #31A45A
tetradic
#5A31A4 #A43142 #7BA431 #31A494
square
#5A31A4 #A43142 #7BA431 #31A494
split-complementary
#5A31A4 #A49431 #42A431
monochromatic
#261546 #402375 #5A31A4 #7749C9 #9A79D7

Accessibility & contrast

On white

8.71
#5A31A4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.41
#5A31A4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A31A4
8.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A31A4#FFFFFF#000000##FFFFFF
##5A31A41.008.712.418.71
#FFFFFF8.711.0021.001.00
#0000002.4121.001.0021.00
##FFFFFF8.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CA7
Deuteranopia (green-blind)
#0049A2
Tritanopia (blue-blind)
#454E67
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #5a31a4;
/* rgb */ color: rgb(90, 49, 164);
/* oklch */ color: oklch(43.3% 0.174 294.3);
Tailwind
colors: {
  custom: {
    50: '#8f6cc0',
    500: '#5a31a4',
    950: '#000000',
  },
}
SCSS
$custom: #5a31a4;
$custom-light: #8f6cc0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a31a4",
  "rgb": {
    "r": 90,
    "g": 49,
    "b": 164
  },
  "hsl": {
    "h": 261.391,
    "s": 53.991,
    "l": 41.765
  },
  "oklch": {
    "l": 0.43264,
    "c": 0.17413,
    "h": 294.3
  },
  "luminance": 0.07051
}

Semantic roles & 50–950 ramp

primary
#5A31A4
secondary
#A4BF72
accent
#DD4AA9
background
#F9F6FB
surface
#F1ECF7
border
#CBC7D0
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5A31A4

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

Preview Lab → · Contrast checker → · Palette generator →

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