#5A1172#5A1172

#5A1172 is a dark, vivid purple. Relative luminance 0.038; OKLCH L 35.7% C 0.157 H 315.7°. Best body text is #FFFFFF at 11.95:1 contrast (WCAG AA passes).

Color values

HEX#5A1172
RGBrgb(90, 17, 114)
HSLhsl(285, 74%, 26%)
HSVhsv(285, 85%, 45%)
CMYKcmyk(21.1%, 85.1%, 0%, 55.3%)
CIE-LABlab(22.96, 46.07, -38.92)
CIE-LCHlch(22.96, 60.31, 319.81°)
OKLaboklab(35.67% 0.1124 -0.1099)
OKLCHoklch(35.67% 0.157 315.7)
XYZxyz(7.4537, 3.7898, 16.2552)
Luminance0.0379 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1172 #297211
analogous
#2A1172 #5A1172 #721159
triadic
#5A1172 #725A11 #11725A
tetradic
#5A1172 #722A11 #297211 #115972
square
#5A1172 #722A11 #297211 #115972
split-complementary
#5A1172 #597211 #11722A
monochromatic
#15041B #30093D #5A1172 #8419A7 #AE21DD

Accessibility & contrast

On white

11.95
#5A1172 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#5A1172 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1172
11.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1172#FFFFFF#000000##FFFFFF
##5A11721.0011.951.7611.95
#FFFFFF11.951.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003375
Deuteranopia (green-blind)
#0D3970
Tritanopia (blue-blind)
#582943
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #5a1172;
/* rgb */ color: rgb(90, 17, 114);
/* oklch */ color: oklch(35.7% 0.157 315.7);
Tailwind
colors: {
  custom: {
    50: '#8c5a9b',
    500: '#5a1172',
    950: '#000000',
  },
}
SCSS
$custom: #5a1172;
$custom-light: #8c5a9b;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1172",
  "rgb": {
    "r": 90,
    "g": 17,
    "b": 114
  },
  "hsl": {
    "h": 285.155,
    "s": 74.046,
    "l": 25.686
  },
  "oklch": {
    "l": 0.35669,
    "c": 0.15723,
    "h": 315.7
  },
  "luminance": 0.03789
}

Semantic roles & 50–950 ramp

primary
#5A1172
secondary
#52A936
accent
#F13765
background
#F8F5F9
surface
#F0E9F2
border
#CBC5CC
text
#0D040E
muted
#7D797E

Preview Lab

Preview with #5A1172

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

Preview Lab → · Contrast checker → · Palette generator →

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