#5B1158#5B1158

#5B1158 is a dark, vivid purple. Relative luminance 0.033; OKLCH L 34.0% C 0.135 H 329.9°. Best body text is #FFFFFF at 12.61:1 contrast (WCAG AA passes).

Color values

HEX#5B1158
RGBrgb(91, 17, 88)
HSLhsl(302, 69%, 21%)
HSVhsv(302, 81%, 36%)
CMYKcmyk(0%, 81.3%, 3.3%, 64.3%)
CIE-LABlab(21.32, 41.23, -24.49)
CIE-LCHlch(21.32, 47.96, 329.29°)
OKLaboklab(33.96% 0.1166 -0.0677)
OKLCHoklch(33.96% 0.135 329.9)
XYZxyz(6.2763, 3.3301, 9.5428)
Luminance0.0333 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B1158 #115B14
analogous
#39115B #5B1158 #5B1133
triadic
#5B1158 #585B11 #11585B
tetradic
#5B1158 #5B3911 #115B14 #11335B
square
#5B1158 #5B3911 #115B14 #11335B
split-complementary
#5B1158 #335B11 #115B39
monochromatic
#1A0519 #270726 #5B1158 #8F1B8A #C224BC

Accessibility & contrast

On white

12.61
#5B1158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#5B1158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B1158
12.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B1158#FFFFFF#000000##FFFFFF
##5B11581.0012.611.6712.61
#FFFFFF12.611.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#062D5A
Deuteranopia (green-blind)
#283756
Tritanopia (blue-blind)
#5F1C34
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #5b1158;
/* rgb */ color: rgb(91, 17, 88);
/* oklch */ color: oklch(34.0% 0.135 329.9);
Tailwind
colors: {
  custom: {
    50: '#8c5987',
    500: '#5b1158',
    950: '#000000',
  },
}
SCSS
$custom: #5b1158;
$custom-light: #8c5987;
$custom-dark: #000000;
JSON
{
  "hex": "#5b1158",
  "rgb": {
    "r": 91,
    "g": 17,
    "b": 88
  },
  "hsl": {
    "h": 302.432,
    "s": 68.519,
    "l": 21.176
  },
  "oklch": {
    "l": 0.3396,
    "c": 0.13485,
    "h": 329.9
  },
  "luminance": 0.0333
}

Semantic roles & 50–950 ramp

primary
#5B1158
secondary
#349438
accent
#EB443C
background
#F8F5F8
surface
#F0E9EF
border
#CBC5CA
text
#0C040B
muted
#7D797C

Preview Lab

Preview with #5B1158

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

Preview Lab → · Contrast checker → · Palette generator →

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