#5A1871#5A1871

#5A1871 is a dark, vivid purple. Relative luminance 0.040; OKLCH L 36.2% C 0.149 H 315.6°. Best body text is #FFFFFF at 11.64:1 contrast (WCAG AA passes).

Color values

HEX#5A1871
RGBrgb(90, 24, 113)
HSLhsl(284, 65%, 27%)
HSVhsv(284, 79%, 44%)
CMYKcmyk(20.4%, 78.8%, 0%, 55.7%)
CIE-LABlab(23.74, 43.40, -37.03)
CIE-LCHlch(23.74, 57.05, 319.53°)
OKLaboklab(36.19% 0.1064 -0.1044)
OKLCHoklch(36.19% 0.149 315.6)
XYZxyz(7.5232, 4.0195, 15.9991)
Luminance0.0402 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1871 #2F7118
analogous
#2D1871 #5A1871 #71185C
triadic
#5A1871 #715A18 #18715A
tetradic
#5A1871 #712D18 #2F7118 #185C71
square
#5A1871 #712D18 #2F7118 #185C71
split-complementary
#5A1871 #5C7118 #18712D
monochromatic
#140519 #320D3F #5A1871 #8223A3 #A930D3

Accessibility & contrast

On white

11.64
#5A1871 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#5A1871 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1871
11.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1871#FFFFFF#000000##FFFFFF
##5A18711.0011.641.8011.64
#FFFFFF11.641.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003573
Deuteranopia (green-blind)
#163A6F
Tritanopia (blue-blind)
#582C44
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #5a1871;
/* rgb */ color: rgb(90, 24, 113);
/* oklch */ color: oklch(36.2% 0.149 315.6);
Tailwind
colors: {
  custom: {
    50: '#8c5d9a',
    500: '#5a1871',
    950: '#000000',
  },
}
SCSS
$custom: #5a1871;
$custom-light: #8c5d9a;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1871",
  "rgb": {
    "r": 90,
    "g": 24,
    "b": 113
  },
  "hsl": {
    "h": 284.494,
    "s": 64.964,
    "l": 26.863
  },
  "oklch": {
    "l": 0.36188,
    "c": 0.14909,
    "h": 315.6
  },
  "luminance": 0.04019
}

Semantic roles & 50–950 ramp

primary
#5A1871
secondary
#59A63E
accent
#E8406B
background
#F8F5F9
surface
#F0E9F2
border
#CBC5CC
text
#0C050E
muted
#7D797E

Preview Lab

Preview with #5A1871

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

Preview Lab → · Contrast checker → · Palette generator →

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