#5B178A#5B178A

#5B178A is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.3% C 0.175 H 306.1°. Best body text is #FFFFFF at 10.86:1 contrast (WCAG AA passes).

Color values

HEX#5B178A
RGBrgb(91, 23, 138)
HSLhsl(275, 71%, 32%)
HSVhsv(275, 83%, 54%)
CMYKcmyk(34.1%, 83.3%, 0%, 45.9%)
CIE-LABlab(25.78, 49.55, -49.54)
CIE-LCHlch(25.78, 70.07, 315.00°)
OKLaboklab(38.28% 0.103 -0.1411)
OKLCHoklch(38.28% 0.175 306.1)
XYZxyz(9.2072, 4.6720, 24.4566)
Luminance0.0467 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B178A #468A17
analogous
#21178A #5B178A #8A1780
triadic
#5B178A #8A5B17 #178A5B
tetradic
#5B178A #8A2117 #468A17 #17808A
square
#5B178A #8A2117 #468A17 #17808A
split-complementary
#5B178A #808A17 #178A21
monochromatic
#160621 #380E56 #5B178A #7E20BE #9C3DDF

Accessibility & contrast

On white

10.86
#5B178A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#5B178A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B178A
10.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B178A#FFFFFF#000000##FFFFFF
##5B178A1.0010.861.9310.86
#FFFFFF10.861.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8D
Deuteranopia (green-blind)
#003D88
Tritanopia (blue-blind)
#523652
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5b178a;
/* rgb */ color: rgb(91, 23, 138);
/* oklch */ color: oklch(38.3% 0.175 306.1);
Tailwind
colors: {
  custom: {
    50: '#8f5ead',
    500: '#5b178a',
    950: '#000000',
  },
}
SCSS
$custom: #5b178a;
$custom-light: #8f5ead;
$custom-dark: #000000;
JSON
{
  "hex": "#5b178a",
  "rgb": {
    "r": 91,
    "g": 23,
    "b": 138
  },
  "hsl": {
    "h": 275.478,
    "s": 71.429,
    "l": 31.569
  },
  "oklch": {
    "l": 0.38284,
    "c": 0.17471,
    "h": 306.1
  },
  "luminance": 0.04672
}

Semantic roles & 50–950 ramp

primary
#5B178A
secondary
#73BE3F
accent
#EE3A83
background
#F9F5FA
surface
#F1EAF4
border
#CBC6CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5B178A

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

Preview Lab → · Contrast checker → · Palette generator →

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