#5B178D#5B178D

#5B178D is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.5% C 0.178 H 305.1°. Best body text is #FFFFFF at 10.76:1 contrast (WCAG AA passes).

Color values

HEX#5B178D
RGBrgb(91, 23, 141)
HSLhsl(275, 72%, 32%)
HSVhsv(275, 84%, 55%)
CMYKcmyk(35.5%, 83.7%, 0%, 44.7%)
CIE-LABlab(26.04, 50.24, -50.98)
CIE-LCHlch(26.04, 71.58, 314.58°)
OKLaboklab(38.55% 0.1021 -0.1453)
OKLCHoklch(38.55% 0.178 305.1)
XYZxyz(9.4274, 4.7601, 25.6163)
Luminance0.0476 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B178D #498D17
analogous
#20178D #5B178D #8D1784
triadic
#5B178D #8D5B17 #178D5B
tetradic
#5B178D #8D2017 #498D17 #17848D
square
#5B178D #8D2017 #498D17 #17848D
split-complementary
#5B178D #848D17 #178D20
monochromatic
#170624 #390E58 #5B178D #7D20C2 #9B3FE0

Accessibility & contrast

On white

10.76
#5B178D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#5B178D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B178D
10.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B178D#FFFFFF#000000##FFFFFF
##5B178D1.0010.761.9510.76
#FFFFFF10.761.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C90
Deuteranopia (green-blind)
#003E8B
Tritanopia (blue-blind)
#513853
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #5b178d;
/* rgb */ color: rgb(91, 23, 141);
/* oklch */ color: oklch(38.5% 0.178 305.1);
Tailwind
colors: {
  custom: {
    50: '#8f5eaf',
    500: '#5b178d',
    950: '#000000',
  },
}
SCSS
$custom: #5b178d;
$custom-light: #8f5eaf;
$custom-dark: #000000;
JSON
{
  "hex": "#5b178d",
  "rgb": {
    "r": 91,
    "g": 23,
    "b": 141
  },
  "hsl": {
    "h": 274.576,
    "s": 71.951,
    "l": 32.157
  },
  "oklch": {
    "l": 0.38546,
    "c": 0.17763,
    "h": 305.1
  },
  "luminance": 0.0476
}

Semantic roles & 50–950 ramp

primary
#5B178D
secondary
#76C040
accent
#EF3986
background
#F9F5FA
surface
#F1EAF5
border
#CBC6CF
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5B178D

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

Preview Lab → · Contrast checker → · Palette generator →

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