#5B157A#5B157A

#5B157A is a dark, vivid purple. Relative luminance 0.042; OKLCH L 36.8% C 0.161 H 312.4°. Best body text is #FFFFFF at 11.46:1 contrast (WCAG AA passes).

Color values

HEX#5B157A
RGBrgb(91, 21, 122)
HSLhsl(282, 71%, 28%)
HSVhsv(282, 83%, 48%)
CMYKcmyk(25.4%, 82.8%, 0%, 52.2%)
CIE-LABlab(24.21, 46.66, -42.01)
CIE-LCHlch(24.21, 62.78, 318.00°)
OKLaboklab(36.78% 0.1088 -0.119)
OKLCHoklch(36.78% 0.161 312.4)
XYZxyz(8.0948, 4.1659, 18.7863)
Luminance0.0417 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B157A #347A15
analogous
#28157A #5B157A #7A1566
triadic
#5B157A #7A5B15 #157A5B
tetradic
#5B157A #7A2815 #347A15 #15667A
square
#5B157A #7A2815 #347A15 #15667A
split-complementary
#5B157A #667A15 #157A28
monochromatic
#13041A #340C46 #5B157A #821EAE #A62EDB

Accessibility & contrast

On white

11.46
#5B157A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5B157A
11.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B157A#FFFFFF#000000##FFFFFF
##5B157A1.0011.461.8311.46
#FFFFFF11.461.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00367D
Deuteranopia (green-blind)
#023B78
Tritanopia (blue-blind)
#572E48
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #5b157a;
/* rgb */ color: rgb(91, 21, 122);
/* oklch */ color: oklch(36.8% 0.161 312.4);
Tailwind
colors: {
  custom: {
    50: '#8e5ca1',
    500: '#5b157a',
    950: '#000000',
  },
}
SCSS
$custom: #5b157a;
$custom-light: #8e5ca1;
$custom-dark: #000000;
JSON
{
  "hex": "#5b157a",
  "rgb": {
    "r": 91,
    "g": 21,
    "b": 122
  },
  "hsl": {
    "h": 281.584,
    "s": 70.629,
    "l": 28.039
  },
  "oklch": {
    "l": 0.36775,
    "c": 0.16123,
    "h": 312.4
  },
  "luminance": 0.04166
}

Semantic roles & 50–950 ramp

primary
#5B157A
secondary
#5FAF3B
accent
#ED3A71
background
#F9F5FA
surface
#F1E9F3
border
#CBC5CD
text
#0D040F
muted
#7E797F

Preview Lab

Preview with #5B157A

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

Preview Lab → · Contrast checker → · Palette generator →

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