#5B175B#5B175B

#5B175B is a dark, vivid purple. Relative luminance 0.036; OKLCH L 34.7% C 0.130 H 327.9°. Best body text is #FFFFFF at 12.22:1 contrast (WCAG AA passes).

Color values

HEX#5B175B
RGBrgb(91, 23, 91)
HSLhsl(300, 60%, 22%)
HSVhsv(300, 75%, 36%)
CMYKcmyk(0%, 74.7%, 0%, 64.3%)
CIE-LABlab(22.28, 39.58, -24.98)
CIE-LCHlch(22.28, 46.80, 327.75°)
OKLaboklab(34.7% 0.1104 -0.0691)
OKLCHoklch(34.7% 0.13 327.9)
XYZxyz(6.5090, 3.5927, 10.2461)
Luminance0.0359 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B175B #175B17
analogous
#39175B #5B175B #5B1739
triadic
#5B175B #5B5B17 #175B5B
tetradic
#5B175B #5B3917 #175B17 #17395B
square
#5B175B #5B3917 #175B17 #17395B
split-complementary
#5B175B #395B17 #175B39
monochromatic
#180618 #2A0B2A #5B175B #8C238C #BD30BD

Accessibility & contrast

On white

12.22
#5B175B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#5B175B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B175B
12.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B175B#FFFFFF#000000##FFFFFF
##5B175B1.0012.221.7212.22
#FFFFFF12.221.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0C305D
Deuteranopia (green-blind)
#293859
Tritanopia (blue-blind)
#5E2137
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #5b175b;
/* rgb */ color: rgb(91, 23, 91);
/* oklch */ color: oklch(34.7% 0.130 327.9);
Tailwind
colors: {
  custom: {
    50: '#8c5b8a',
    500: '#5b175b',
    950: '#000000',
  },
}
SCSS
$custom: #5b175b;
$custom-light: #8c5b8a;
$custom-dark: #000000;
JSON
{
  "hex": "#5b175b",
  "rgb": {
    "r": 91,
    "g": 23,
    "b": 91
  },
  "hsl": {
    "h": 300,
    "s": 59.649,
    "l": 22.353
  },
  "oklch": {
    "l": 0.34704,
    "c": 0.13025,
    "h": 327.9
  },
  "luminance": 0.03592
}

Semantic roles & 50–950 ramp

primary
#5B175B
secondary
#3C923C
accent
#E34545
background
#F8F5F8
surface
#F0E9F0
border
#CBC5CB
text
#0C040B
muted
#7D797C

Preview Lab

Preview with #5B175B

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

Preview Lab → · Contrast checker → · Palette generator →

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