#5B175E#5B175E

#5B175E is a dark, vivid purple. Relative luminance 0.036; OKLCH L 34.9% C 0.133 H 326.1°. Best body text is #FFFFFF at 12.15:1 contrast (WCAG AA passes).

Color values

HEX#5B175E
RGBrgb(91, 23, 94)
HSLhsl(297, 61%, 23%)
HSVhsv(297, 76%, 37%)
CMYKcmyk(3.2%, 75.5%, 0%, 63.1%)
CIE-LABlab(22.46, 40.15, -26.67)
CIE-LCHlch(22.46, 48.20, 326.41°)
OKLaboklab(34.9% 0.1104 -0.074)
OKLCHoklch(34.9% 0.133 326.1)
XYZxyz(6.6410, 3.6455, 10.9414)
Luminance0.0365 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B175E #1A5E17
analogous
#37175E #5B175E #5E173D
triadic
#5B175E #5E5B17 #175E5B
tetradic
#5B175E #5E3717 #1A5E17 #173D5E
square
#5B175E #5E3717 #1A5E17 #173D5E
split-complementary
#5B175E #3D5E17 #175E37
monochromatic
#180619 #2B0B2D #5B175E #8B238F #BA2FC0

Accessibility & contrast

On white

12.15
#5B175E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#5B175E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B175E
12.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B175E#FFFFFF#000000##FFFFFF
##5B175E1.0012.151.7312.15
#FFFFFF12.151.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.151.0021.001.00

Color blindness preview

Protanopia (red-blind)
#073060
Deuteranopia (green-blind)
#27395C
Tritanopia (blue-blind)
#5D2239
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #5b175e;
/* rgb */ color: rgb(91, 23, 94);
/* oklch */ color: oklch(34.9% 0.133 326.1);
Tailwind
colors: {
  custom: {
    50: '#8c5c8c',
    500: '#5b175e',
    950: '#000000',
  },
}
SCSS
$custom: #5b175e;
$custom-light: #8c5c8c;
$custom-dark: #000000;
JSON
{
  "hex": "#5b175e",
  "rgb": {
    "r": 91,
    "g": 23,
    "b": 94
  },
  "hsl": {
    "h": 297.465,
    "s": 60.684,
    "l": 22.941
  },
  "oklch": {
    "l": 0.34898,
    "c": 0.13293,
    "h": 326.1
  },
  "luminance": 0.03645
}

Semantic roles & 50–950 ramp

primary
#5B175E
secondary
#40953C
accent
#E4444B
background
#F8F5F8
surface
#F0E9F0
border
#CBC5CB
text
#0C040C
muted
#7D797D

Preview Lab

Preview with #5B175E

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

Preview Lab → · Contrast checker → · Palette generator →

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