#5B31A2#5B31A2

#5B31A2 is a dark, vivid violet. Relative luminance 0.070; OKLCH L 43.2% C 0.172 H 295.3°. Best body text is #FFFFFF at 8.73:1 contrast (WCAG AA passes).

Color values

HEX#5B31A2
RGBrgb(91, 49, 162)
HSLhsl(262, 54%, 41%)
HSVhsv(262, 70%, 64%)
CMYKcmyk(43.8%, 69.8%, 0%, 36.5%)
CIE-LABlab(31.87, 44.01, -54.34)
CIE-LCHlch(31.87, 69.93, 309.01°)
OKLaboklab(43.21% 0.0734 -0.1554)
OKLCHoklch(43.21% 0.172 295.3)
XYZxyz(11.9325, 7.0291, 34.9035)
Luminance0.0703 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B31A2 #78A231
analogous
#3140A2 #5B31A2 #9431A2
triadic
#5B31A2 #A25B31 #31A25B
tetradic
#5B31A2 #A23140 #78A231 #31A294
square
#5B31A2 #A23140 #78A231 #31A294
split-complementary
#5B31A2 #A29431 #40A231
monochromatic
#261544 #412373 #5B31A2 #7848C8 #9B77D6

Accessibility & contrast

On white

8.73
#5B31A2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5B31A2
8.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B31A2#FFFFFF#000000##FFFFFF
##5B31A21.008.732.418.73
#FFFFFF8.731.0021.001.00
#0000002.4121.001.0021.00
##FFFFFF8.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CA5
Deuteranopia (green-blind)
#0049A0
Tritanopia (blue-blind)
#484D66
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #5b31a2;
/* rgb */ color: rgb(91, 49, 162);
/* oklch */ color: oklch(43.2% 0.172 295.3);
Tailwind
colors: {
  custom: {
    50: '#906cbe',
    500: '#5b31a2',
    950: '#000000',
  },
}
SCSS
$custom: #5b31a2;
$custom-light: #906cbe;
$custom-dark: #000000;
JSON
{
  "hex": "#5b31a2",
  "rgb": {
    "r": 91,
    "g": 49,
    "b": 162
  },
  "hsl": {
    "h": 262.301,
    "s": 53.555,
    "l": 41.373
  },
  "oklch": {
    "l": 0.43206,
    "c": 0.17183,
    "h": 295.3
  },
  "luminance": 0.07029
}

Semantic roles & 50–950 ramp

primary
#5B31A2
secondary
#A1BE71
accent
#DD4BA7
background
#F9F6FB
surface
#F1ECF7
border
#CBC7D0
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5B31A2

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

Preview Lab → · Contrast checker → · Palette generator →

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