#5B178E#5B178E

#5B178E is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.6% C 0.179 H 304.7°. Best body text is #FFFFFF at 10.73:1 contrast (WCAG AA passes).

Color values

HEX#5B178E
RGBrgb(91, 23, 142)
HSLhsl(274, 72%, 32%)
HSVhsv(274, 84%, 56%)
CMYKcmyk(35.9%, 83.8%, 0%, 44.3%)
CIE-LABlab(26.13, 50.47, -51.46)
CIE-LCHlch(26.13, 72.08, 314.44°)
OKLaboklab(38.63% 0.1018 -0.1468)
OKLCHoklch(38.63% 0.179 304.7)
XYZxyz(9.5021, 4.7900, 26.0099)
Luminance0.0479 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B178E #4A8E17
analogous
#20178E #5B178E #8E1785
triadic
#5B178E #8E5B17 #178E5B
tetradic
#5B178E #8E2017 #4A8E17 #17858E
square
#5B178E #8E2017 #4A8E17 #17858E
split-complementary
#5B178E #858E17 #178E20
monochromatic
#170625 #390E59 #5B178E #7D20C3 #9B3FE0

Accessibility & contrast

On white

10.73
#5B178E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#5B178E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B178E
10.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B178E#FFFFFF#000000##FFFFFF
##5B178E1.0010.731.9610.73
#FFFFFF10.731.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C91
Deuteranopia (green-blind)
#003E8C
Tritanopia (blue-blind)
#513854
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #5b178e;
/* rgb */ color: rgb(91, 23, 142);
/* oklch */ color: oklch(38.6% 0.179 304.7);
Tailwind
colors: {
  custom: {
    50: '#8f5eb0',
    500: '#5b178e',
    950: '#000000',
  },
}
SCSS
$custom: #5b178e;
$custom-light: #8f5eb0;
$custom-dark: #000000;
JSON
{
  "hex": "#5b178e",
  "rgb": {
    "r": 91,
    "g": 23,
    "b": 142
  },
  "hsl": {
    "h": 274.286,
    "s": 72.121,
    "l": 32.353
  },
  "oklch": {
    "l": 0.38634,
    "c": 0.1786,
    "h": 304.7
  },
  "luminance": 0.0479
}

Semantic roles & 50–950 ramp

primary
#5B178E
secondary
#77C040
accent
#EF3987
background
#F9F5FA
surface
#F1EAF5
border
#CBC6CF
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5B178E

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

Preview Lab → · Contrast checker → · Palette generator →

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