#5A31D4#5A31D4

#5A31D4 is a mid, highly saturated violet. Relative luminance 0.091; OKLCH L 47.6% C 0.229 H 285.2°. Best body text is #FFFFFF at 7.43:1 contrast (WCAG AA passes).

Color values

HEX#5A31D4
RGBrgb(90, 49, 212)
HSLhsl(255, 65%, 51%)
HSVhsv(255, 77%, 83%)
CMYKcmyk(57.5%, 76.9%, 0%, 16.9%)
CIE-LABlab(36.22, 57.70, -76.74)
CIE-LCHlch(36.22, 96.01, 306.94°)
OKLaboklab(47.61% 0.0602 -0.2211)
OKLCHoklch(47.61% 0.229 285.2)
XYZxyz(17.1948, 9.1227, 63.1294)
Luminance0.0912 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A31D4 #ABD431
analogous
#3159D4 #5A31D4 #AB31D4
triadic
#5A31D4 #D45A31 #31D45A
tetradic
#5A31D4 #D43159 #ABD431 #31D4AB
square
#5A31D4 #D43159 #ABD431 #31D4AB
split-complementary
#5A31D4 #D4AB31 #59D431
monochromatic
#2F1873 #4323A5 #5A31D4 #8364DF #AB96E9

Accessibility & contrast

On white

7.43
#5A31D4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.82
#5A31D4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A31D4
7.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A31D4#FFFFFF#000000##FFFFFF
##5A31D41.007.432.827.43
#FFFFFF7.431.0021.001.00
#0000002.8221.001.0021.00
##FFFFFF7.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AD9
Deuteranopia (green-blind)
#0050D1
Tritanopia (blue-blind)
#176082
Achromatopsia (no color)
#555555

Design tokens & code

CSS
--color: #5a31d4;
/* rgb */ color: rgb(90, 49, 212);
/* oklch */ color: oklch(47.6% 0.229 285.2);
Tailwind
colors: {
  custom: {
    50: '#966ee3',
    500: '#5a31d4',
    950: '#000000',
  },
}
SCSS
$custom: #5a31d4;
$custom-light: #966ee3;
$custom-dark: #000000;
JSON
{
  "hex": "#5a31d4",
  "rgb": {
    "r": 90,
    "g": 49,
    "b": 212
  },
  "hsl": {
    "h": 255.092,
    "s": 65.462,
    "l": 51.176
  },
  "oklch": {
    "l": 0.47609,
    "c": 0.22911,
    "h": 285.2
  },
  "luminance": 0.09124
}

Semantic roles & 50–950 ramp

primary
#5A31D4
secondary
#C2D48C
accent
#E83FBE
background
#FAF6FE
surface
#F3ECFC
border
#CDC7D5
text
#0F0816
muted
#7F7B84

Preview Lab

Preview with #5A31D4

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

Preview Lab → · Contrast checker → · Palette generator →

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