#5A1787#5A1787

#5A1787 is a dark, vivid violet. Relative luminance 0.045; OKLCH L 37.9% C 0.172 H 306.7°. Best body text is #FFFFFF at 11.01:1 contrast (WCAG AA passes).

Color values

HEX#5A1787
RGBrgb(90, 23, 135)
HSLhsl(276, 71%, 31%)
HSVhsv(276, 83%, 53%)
CMYKcmyk(33.3%, 83%, 0%, 47.1%)
CIE-LABlab(25.37, 48.69, -48.34)
CIE-LCHlch(25.37, 68.61, 315.21°)
OKLaboklab(37.89% 0.1024 -0.1376)
OKLCHoklch(37.89% 0.172 306.7)
XYZxyz(8.8951, 4.5358, 23.3239)
Luminance0.0454 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1787 #448717
analogous
#221787 #5A1787 #87177C
triadic
#5A1787 #875A17 #17875A
tetradic
#5A1787 #872217 #448717 #177C87
square
#5A1787 #872217 #448717 #177C87
split-complementary
#5A1787 #7C8717 #178722
monochromatic
#14051E #370E53 #5A1787 #7D20BB #9C3BDE

Accessibility & contrast

On white

11.01
#5A1787 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#5A1787 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1787
11.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1787#FFFFFF#000000##FFFFFF
##5A17871.0011.011.9111.01
#FFFFFF11.011.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF11.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8A
Deuteranopia (green-blind)
#003C85
Tritanopia (blue-blind)
#523550
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #5a1787;
/* rgb */ color: rgb(90, 23, 135);
/* oklch */ color: oklch(37.9% 0.172 306.7);
Tailwind
colors: {
  custom: {
    50: '#8e5eab',
    500: '#5a1787',
    950: '#000000',
  },
}
SCSS
$custom: #5a1787;
$custom-light: #8e5eab;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1787",
  "rgb": {
    "r": 90,
    "g": 23,
    "b": 135
  },
  "hsl": {
    "h": 275.893,
    "s": 70.886,
    "l": 30.98
  },
  "oklch": {
    "l": 0.37887,
    "c": 0.17155,
    "h": 306.7
  },
  "luminance": 0.04536
}

Semantic roles & 50–950 ramp

primary
#5A1787
secondary
#71BB3F
accent
#EE3A82
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A1787

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

Preview Lab → · Contrast checker → · Palette generator →

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