#5B1172#5B1172

#5B1172 is a dark, vivid purple. Relative luminance 0.038; OKLCH L 35.8% C 0.158 H 316.2°. Best body text is #FFFFFF at 11.88:1 contrast (WCAG AA passes).

Color values

HEX#5B1172
RGBrgb(91, 17, 114)
HSLhsl(286, 74%, 26%)
HSVhsv(286, 85%, 45%)
CMYKcmyk(20.2%, 85.1%, 0%, 55.3%)
CIE-LABlab(23.14, 46.26, -38.63)
CIE-LCHlch(23.14, 60.27, 320.13°)
OKLaboklab(35.82% 0.1138 -0.109)
OKLCHoklch(35.82% 0.158 316.2)
XYZxyz(7.5516, 3.8403, 16.2598)
Luminance0.0384 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B1172 #287211
analogous
#2A1172 #5B1172 #721158
triadic
#5B1172 #725B11 #11725B
tetradic
#5B1172 #722A11 #287211 #115872
square
#5B1172 #722A11 #287211 #115872
split-complementary
#5B1172 #587211 #11722A
monochromatic
#15041B #30093D #5B1172 #8619A7 #B021DD

Accessibility & contrast

On white

11.88
#5B1172 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#5B1172 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B1172
11.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B1172#FFFFFF#000000##FFFFFF
##5B11721.0011.881.7711.88
#FFFFFF11.881.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003375
Deuteranopia (green-blind)
#0F3970
Tritanopia (blue-blind)
#592943
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #5b1172;
/* rgb */ color: rgb(91, 17, 114);
/* oklch */ color: oklch(35.8% 0.158 316.2);
Tailwind
colors: {
  custom: {
    50: '#8d5a9b',
    500: '#5b1172',
    950: '#000000',
  },
}
SCSS
$custom: #5b1172;
$custom-light: #8d5a9b;
$custom-dark: #000000;
JSON
{
  "hex": "#5b1172",
  "rgb": {
    "r": 91,
    "g": 17,
    "b": 114
  },
  "hsl": {
    "h": 285.773,
    "s": 74.046,
    "l": 25.686
  },
  "oklch": {
    "l": 0.35823,
    "c": 0.15759,
    "h": 316.2
  },
  "luminance": 0.0384
}

Semantic roles & 50–950 ramp

primary
#5B1172
secondary
#51A936
accent
#F13763
background
#F9F5F9
surface
#F1E9F2
border
#CBC5CC
text
#0D040E
muted
#7E797E

Preview Lab

Preview with #5B1172

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

Preview Lab → · Contrast checker → · Palette generator →

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