#5B157B#5B157B

#5B157B is a dark, vivid purple. Relative luminance 0.042; OKLCH L 36.9% C 0.162 H 312.0°. Best body text is #FFFFFF at 11.42:1 contrast (WCAG AA passes).

Color values

HEX#5B157B
RGBrgb(91, 21, 123)
HSLhsl(281, 71%, 28%)
HSVhsv(281, 83%, 48%)
CMYKcmyk(26%, 82.9%, 0%, 51.8%)
CIE-LABlab(24.29, 46.87, -42.52)
CIE-LCHlch(24.29, 63.28, 317.79°)
OKLaboklab(36.86% 0.1086 -0.1205)
OKLCHoklch(36.86% 0.162 312)
XYZxyz(8.1570, 4.1908, 19.1143)
Luminance0.0419 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B157B #357B15
analogous
#28157B #5B157B #7B1568
triadic
#5B157B #7B5B15 #157B5B
tetradic
#5B157B #7B2815 #357B15 #15687B
square
#5B157B #7B2815 #357B15 #15687B
split-complementary
#5B157B #687B15 #157B28
monochromatic
#13041A #340C47 #5B157B #821EAF #A52FDB

Accessibility & contrast

On white

11.42
#5B157B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#5B157B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B157B
11.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B157B#FFFFFF#000000##FFFFFF
##5B157B1.0011.421.8411.42
#FFFFFF11.421.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00367E
Deuteranopia (green-blind)
#003B79
Tritanopia (blue-blind)
#572F49
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #5b157b;
/* rgb */ color: rgb(91, 21, 123);
/* oklch */ color: oklch(36.9% 0.162 312.0);
Tailwind
colors: {
  custom: {
    50: '#8e5ca2',
    500: '#5b157b',
    950: '#000000',
  },
}
SCSS
$custom: #5b157b;
$custom-light: #8e5ca2;
$custom-dark: #000000;
JSON
{
  "hex": "#5b157b",
  "rgb": {
    "r": 91,
    "g": 21,
    "b": 123
  },
  "hsl": {
    "h": 281.176,
    "s": 70.833,
    "l": 28.235
  },
  "oklch": {
    "l": 0.36857,
    "c": 0.16218,
    "h": 312
  },
  "luminance": 0.04191
}

Semantic roles & 50–950 ramp

primary
#5B157B
secondary
#60B03B
accent
#EE3A72
background
#F9F5FA
surface
#F1E9F3
border
#CBC5CD
text
#0D040F
muted
#7E797F

Preview Lab

Preview with #5B157B

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

Preview Lab → · Contrast checker → · Palette generator →

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