#5A157A#5A157A

#5A157A is a dark, vivid purple. Relative luminance 0.041; OKLCH L 36.6% C 0.161 H 311.9°. Best body text is #FFFFFF at 11.52:1 contrast (WCAG AA passes).

Color values

HEX#5A157A
RGBrgb(90, 21, 122)
HSLhsl(281, 71%, 28%)
HSVhsv(281, 83%, 48%)
CMYKcmyk(26.2%, 82.8%, 0%, 52.2%)
CIE-LABlab(24.05, 46.47, -42.28)
CIE-LCHlch(24.05, 62.82, 317.70°)
OKLaboklab(36.63% 0.1074 -0.1198)
OKLCHoklch(36.63% 0.161 311.9)
XYZxyz(7.9968, 4.1154, 18.7817)
Luminance0.0411 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A157A #357A15
analogous
#27157A #5A157A #7A1567
triadic
#5A157A #7A5A15 #157A5A
tetradic
#5A157A #7A2715 #357A15 #15677A
square
#5A157A #7A2715 #357A15 #15677A
split-complementary
#5A157A #677A15 #157A27
monochromatic
#13041A #330C46 #5A157A #811EAE #A42EDB

Accessibility & contrast

On white

11.52
#5A157A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#5A157A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A157A
11.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A157A#FFFFFF#000000##FFFFFF
##5A157A1.0011.521.8211.52
#FFFFFF11.521.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00367D
Deuteranopia (green-blind)
#003A78
Tritanopia (blue-blind)
#562E48
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #5a157a;
/* rgb */ color: rgb(90, 21, 122);
/* oklch */ color: oklch(36.6% 0.161 311.9);
Tailwind
colors: {
  custom: {
    50: '#8d5ca1',
    500: '#5a157a',
    950: '#000000',
  },
}
SCSS
$custom: #5a157a;
$custom-light: #8d5ca1;
$custom-dark: #000000;
JSON
{
  "hex": "#5a157a",
  "rgb": {
    "r": 90,
    "g": 21,
    "b": 122
  },
  "hsl": {
    "h": 280.99,
    "s": 70.629,
    "l": 28.039
  },
  "oklch": {
    "l": 0.36628,
    "c": 0.16091,
    "h": 311.9
  },
  "luminance": 0.04115
}

Semantic roles & 50–950 ramp

primary
#5A157A
secondary
#60AF3B
accent
#ED3A73
background
#F9F5FA
surface
#F1E9F3
border
#CBC5CD
text
#0D040F
muted
#7E797F

Preview Lab

Preview with #5A157A

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

Preview Lab → · Contrast checker → · Palette generator →

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