#5A157B#5A157B

#5A157B is a dark, vivid purple. Relative luminance 0.041; OKLCH L 36.7% C 0.162 H 311.5°. Best body text is #FFFFFF at 11.49:1 contrast (WCAG AA passes).

Color values

HEX#5A157B
RGBrgb(90, 21, 123)
HSLhsl(281, 71%, 28%)
HSVhsv(281, 83%, 48%)
CMYKcmyk(26.8%, 82.9%, 0%, 51.8%)
CIE-LABlab(24.13, 46.69, -42.79)
CIE-LCHlch(24.13, 63.33, 317.50°)
OKLaboklab(36.71% 0.1072 -0.1213)
OKLCHoklch(36.71% 0.162 311.5)
XYZxyz(8.0591, 4.1403, 19.1097)
Luminance0.0414 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A157B #367B15
analogous
#27157B #5A157B #7B1569
triadic
#5A157B #7B5A15 #157B5A
tetradic
#5A157B #7B2715 #367B15 #15697B
square
#5A157B #7B2715 #367B15 #15697B
split-complementary
#5A157B #697B15 #157B27
monochromatic
#13041A #340C47 #5A157B #801EAF #A42FDB

Accessibility & contrast

On white

11.49
#5A157B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#5A157B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A157B
11.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A157B#FFFFFF#000000##FFFFFF
##5A157B1.0011.491.8311.49
#FFFFFF11.491.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00367E
Deuteranopia (green-blind)
#003B79
Tritanopia (blue-blind)
#562F49
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #5a157b;
/* rgb */ color: rgb(90, 21, 123);
/* oklch */ color: oklch(36.7% 0.162 311.5);
Tailwind
colors: {
  custom: {
    50: '#8d5ca2',
    500: '#5a157b',
    950: '#000000',
  },
}
SCSS
$custom: #5a157b;
$custom-light: #8d5ca2;
$custom-dark: #000000;
JSON
{
  "hex": "#5a157b",
  "rgb": {
    "r": 90,
    "g": 21,
    "b": 123
  },
  "hsl": {
    "h": 280.588,
    "s": 70.833,
    "l": 28.235
  },
  "oklch": {
    "l": 0.3671,
    "c": 0.16185,
    "h": 311.5
  },
  "luminance": 0.0414
}

Semantic roles & 50–950 ramp

primary
#5A157B
secondary
#61B03B
accent
#EE3A74
background
#F9F5FA
surface
#F1E9F3
border
#CBC5CD
text
#0D040F
muted
#7E797F

Preview Lab

Preview with #5A157B

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

Preview Lab → · Contrast checker → · Palette generator →

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