#5A1171#5A1171

#5A1171 is a dark, vivid purple. Relative luminance 0.038; OKLCH L 35.6% C 0.156 H 316.1°. Best body text is #FFFFFF at 11.98:1 contrast (WCAG AA passes).

Color values

HEX#5A1171
RGBrgb(90, 17, 113)
HSLhsl(286, 74%, 25%)
HSVhsv(286, 85%, 44%)
CMYKcmyk(20.4%, 85%, 0%, 55.7%)
CIE-LABlab(22.89, 45.86, -38.40)
CIE-LCHlch(22.89, 59.82, 320.06°)
OKLaboklab(35.59% 0.1127 -0.1084)
OKLCHoklch(35.59% 0.156 316.1)
XYZxyz(7.3971, 3.7671, 15.9571)
Luminance0.0377 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1171 #287111
analogous
#2A1171 #5A1171 #711158
triadic
#5A1171 #715A11 #11715A
tetradic
#5A1171 #712A11 #287111 #115871
square
#5A1171 #712A11 #287111 #115871
split-complementary
#5A1171 #587111 #11712A
monochromatic
#15041B #30093C #5A1171 #8419A6 #AF21DB

Accessibility & contrast

On white

11.98
#5A1171 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#5A1171 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1171
11.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1171#FFFFFF#000000##FFFFFF
##5A11711.0011.981.7511.98
#FFFFFF11.981.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF11.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003374
Deuteranopia (green-blind)
#0F396F
Tritanopia (blue-blind)
#582842
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #5a1171;
/* rgb */ color: rgb(90, 17, 113);
/* oklch */ color: oklch(35.6% 0.156 316.1);
Tailwind
colors: {
  custom: {
    50: '#8c5a9a',
    500: '#5a1171',
    950: '#000000',
  },
}
SCSS
$custom: #5a1171;
$custom-light: #8c5a9a;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1171",
  "rgb": {
    "r": 90,
    "g": 17,
    "b": 113
  },
  "hsl": {
    "h": 285.625,
    "s": 73.846,
    "l": 25.49
  },
  "oklch": {
    "l": 0.3559,
    "c": 0.15632,
    "h": 316.1
  },
  "luminance": 0.03767
}

Semantic roles & 50–950 ramp

primary
#5A1171
secondary
#51A836
accent
#F13764
background
#F8F5F9
surface
#F0E9F2
border
#CBC5CC
text
#0D040E
muted
#7D797E

Preview Lab

Preview with #5A1171

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

Preview Lab → · Contrast checker → · Palette generator →

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