#5B157E#5B157E

#5B157E is a dark, vivid purple. Relative luminance 0.043; OKLCH L 37.1% C 0.165 H 310.8°. Best body text is #FFFFFF at 11.33:1 contrast (WCAG AA passes).

Color values

HEX#5B157E
RGBrgb(91, 21, 126)
HSLhsl(280, 71%, 29%)
HSVhsv(280, 83%, 49%)
CMYKcmyk(27.8%, 83.3%, 0%, 50.6%)
CIE-LABlab(24.54, 47.53, -44.03)
CIE-LCHlch(24.54, 64.79, 317.19°)
OKLaboklab(37.1% 0.1079 -0.1249)
OKLCHoklch(37.1% 0.165 310.8)
XYZxyz(8.3477, 4.2670, 20.1185)
Luminance0.0427 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B157E #387E15
analogous
#27157E #5B157E #7E156D
triadic
#5B157E #7E5B15 #157E5B
tetradic
#5B157E #7E2715 #387E15 #156D7E
square
#5B157E #7E2715 #387E15 #156D7E
split-complementary
#5B157E #6D7E15 #157E27
monochromatic
#13041A #350C4A #5B157E #811EB2 #A331DD

Accessibility & contrast

On white

11.33
#5B157E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#5B157E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B157E
11.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B157E#FFFFFF#000000##FFFFFF
##5B157E1.0011.331.8511.33
#FFFFFF11.331.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003781
Deuteranopia (green-blind)
#003B7C
Tritanopia (blue-blind)
#56304A
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #5b157e;
/* rgb */ color: rgb(91, 21, 126);
/* oklch */ color: oklch(37.1% 0.165 310.8);
Tailwind
colors: {
  custom: {
    50: '#8e5ca4',
    500: '#5b157e',
    950: '#000000',
  },
}
SCSS
$custom: #5b157e;
$custom-light: #8e5ca4;
$custom-dark: #000000;
JSON
{
  "hex": "#5b157e",
  "rgb": {
    "r": 91,
    "g": 21,
    "b": 126
  },
  "hsl": {
    "h": 280,
    "s": 71.429,
    "l": 28.824
  },
  "oklch": {
    "l": 0.37103,
    "c": 0.16502,
    "h": 310.8
  },
  "luminance": 0.04267
}

Semantic roles & 50–950 ramp

primary
#5B157E
secondary
#64B33C
accent
#EE3A76
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D050F
muted
#7E797F

Preview Lab

Preview with #5B157E

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

Preview Lab → · Contrast checker → · Palette generator →

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