#5A1786#5A1786

#5A1786 is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.8% C 0.171 H 307.0°. Best body text is #FFFFFF at 11.04:1 contrast (WCAG AA passes).

Color values

HEX#5A1786
RGBrgb(90, 23, 134)
HSLhsl(276, 71%, 31%)
HSVhsv(276, 83%, 53%)
CMYKcmyk(32.8%, 82.8%, 0%, 47.5%)
CIE-LABlab(25.28, 48.46, -47.85)
CIE-LCHlch(25.28, 68.11, 315.36°)
OKLaboklab(37.8% 0.1027 -0.1362)
OKLCHoklch(37.8% 0.171 307)
XYZxyz(8.8250, 4.5078, 22.9548)
Luminance0.0451 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1786 #438617
analogous
#221786 #5A1786 #86177A
triadic
#5A1786 #865A17 #17865A
tetradic
#5A1786 #862217 #438617 #177A86
square
#5A1786 #862217 #438617 #177A86
split-complementary
#5A1786 #7A8617 #178622
monochromatic
#14051E #370E52 #5A1786 #7D20BA #9D3ADD

Accessibility & contrast

On white

11.04
#5A1786 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#5A1786 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1786
11.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1786#FFFFFF#000000##FFFFFF
##5A17861.0011.041.9011.04
#FFFFFF11.041.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A89
Deuteranopia (green-blind)
#003C84
Tritanopia (blue-blind)
#52354F
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #5a1786;
/* rgb */ color: rgb(90, 23, 134);
/* oklch */ color: oklch(37.8% 0.171 307.0);
Tailwind
colors: {
  custom: {
    50: '#8e5eaa',
    500: '#5a1786',
    950: '#000000',
  },
}
SCSS
$custom: #5a1786;
$custom-light: #8e5eaa;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1786",
  "rgb": {
    "r": 90,
    "g": 23,
    "b": 134
  },
  "hsl": {
    "h": 276.216,
    "s": 70.701,
    "l": 30.784
  },
  "oklch": {
    "l": 0.37801,
    "c": 0.17057,
    "h": 307
  },
  "luminance": 0.04508
}

Semantic roles & 50–950 ramp

primary
#5A1786
secondary
#70BA3F
accent
#ED3A81
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A1786

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

Preview Lab → · Contrast checker → · Palette generator →

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