#5A1887#5A1887

#5A1887 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 38.0% C 0.171 H 306.6°. Best body text is #FFFFFF at 10.96:1 contrast (WCAG AA passes).

Color values

HEX#5A1887
RGBrgb(90, 24, 135)
HSLhsl(276, 70%, 31%)
HSVhsv(276, 82%, 53%)
CMYKcmyk(33.3%, 82.2%, 0%, 47.1%)
CIE-LABlab(25.49, 48.34, -48.14)
CIE-LCHlch(25.49, 68.22, 315.12°)
OKLaboklab(37.97% 0.1016 -0.137)
OKLCHoklch(37.97% 0.171 306.6)
XYZxyz(8.9153, 4.5763, 23.3306)
Luminance0.0458 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1887 #458718
analogous
#231887 #5A1887 #87187C
triadic
#5A1887 #875A18 #18875A
tetradic
#5A1887 #872318 #458718 #187C87
square
#5A1887 #872318 #458718 #187C87
split-complementary
#5A1887 #7C8718 #188723
monochromatic
#15061F #370F53 #5A1887 #7D21BB #9C3DDC

Accessibility & contrast

On white

10.96
#5A1887 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#5A1887 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1887
10.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1887#FFFFFF#000000##FFFFFF
##5A18871.0010.961.9210.96
#FFFFFF10.961.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.961.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5a1887;
/* rgb */ color: rgb(90, 24, 135);
/* oklch */ color: oklch(38.0% 0.171 306.6);
Tailwind
colors: {
  custom: {
    50: '#8e5eab',
    500: '#5a1887',
    950: '#000000',
  },
}
SCSS
$custom: #5a1887;
$custom-light: #8e5eab;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1887",
  "rgb": {
    "r": 90,
    "g": 24,
    "b": 135
  },
  "hsl": {
    "h": 275.676,
    "s": 69.811,
    "l": 31.176
  },
  "oklch": {
    "l": 0.37972,
    "c": 0.1706,
    "h": 306.6
  },
  "luminance": 0.04576
}

Semantic roles & 50–950 ramp

primary
#5A1887
secondary
#72BB40
accent
#ED3B83
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A1887

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

Preview Lab → · Contrast checker → · Palette generator →

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