#5B178B#5B178B

#5B178B is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.4% C 0.176 H 305.8°. Best body text is #FFFFFF at 10.82:1 contrast (WCAG AA passes).

Color values

HEX#5B178B
RGBrgb(91, 23, 139)
HSLhsl(275, 72%, 32%)
HSVhsv(275, 83%, 55%)
CMYKcmyk(34.5%, 83.5%, 0%, 45.5%)
CIE-LABlab(25.87, 49.78, -50.02)
CIE-LCHlch(25.87, 70.57, 314.86°)
OKLaboklab(38.37% 0.1027 -0.1425)
OKLCHoklch(38.37% 0.176 305.8)
XYZxyz(9.2799, 4.7011, 24.8396)
Luminance0.0470 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B178B #478B17
analogous
#21178B #5B178B #8B1781
triadic
#5B178B #8B5B17 #178B5B
tetradic
#5B178B #8B2117 #478B17 #17818B
square
#5B178B #8B2117 #478B17 #17818B
split-complementary
#5B178B #818B17 #178B21
monochromatic
#160622 #390E56 #5B178B #7D20C0 #9C3DDF

Accessibility & contrast

On white

10.82
#5B178B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#5B178B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B178B
10.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B178B#FFFFFF#000000##FFFFFF
##5B178B1.0010.821.9410.82
#FFFFFF10.821.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8E
Deuteranopia (green-blind)
#003D89
Tritanopia (blue-blind)
#523752
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5b178b;
/* rgb */ color: rgb(91, 23, 139);
/* oklch */ color: oklch(38.4% 0.176 305.8);
Tailwind
colors: {
  custom: {
    50: '#8f5eae',
    500: '#5b178b',
    950: '#000000',
  },
}
SCSS
$custom: #5b178b;
$custom-light: #8f5eae;
$custom-dark: #000000;
JSON
{
  "hex": "#5b178b",
  "rgb": {
    "r": 91,
    "g": 23,
    "b": 139
  },
  "hsl": {
    "h": 275.172,
    "s": 71.605,
    "l": 31.765
  },
  "oklch": {
    "l": 0.38371,
    "c": 0.17568,
    "h": 305.8
  },
  "luminance": 0.04701
}

Semantic roles & 50–950 ramp

primary
#5B178B
secondary
#74BF3F
accent
#EE3984
background
#F9F5FA
surface
#F1EAF4
border
#CBC6CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5B178B

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

Preview Lab → · Contrast checker → · Palette generator →

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