#5B168D#5B168D

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

Color values

HEX#5B168D
RGBrgb(91, 22, 141)
HSLhsl(275, 73%, 32%)
HSVhsv(275, 84%, 55%)
CMYKcmyk(35.5%, 84.4%, 0%, 44.7%)
CIE-LABlab(25.92, 50.58, -51.17)
CIE-LCHlch(25.92, 71.95, 314.67°)
OKLaboklab(38.47% 0.1028 -0.1459)
OKLCHoklch(38.47% 0.179 305.2)
XYZxyz(9.4079, 4.7211, 25.6098)
Luminance0.0472 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B168D #488D16
analogous
#20168D #5B168D #8D1684
triadic
#5B168D #8D5B16 #168D5B
tetradic
#5B168D #8D2016 #488D16 #16848D
square
#5B168D #8D2016 #488D16 #16848D
split-complementary
#5B168D #848D16 #168D20
monochromatic
#170523 #390E58 #5B168D #7D1EC2 #9C3DE1

Accessibility & contrast

On white

10.80
#5B168D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5B168D
10.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B168D#FFFFFF#000000##FFFFFF
##5B168D1.0010.801.9410.80
#FFFFFF10.801.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C90
Deuteranopia (green-blind)
#003D8B
Tritanopia (blue-blind)
#513753
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5b168d;
/* rgb */ color: rgb(91, 22, 141);
/* oklch */ color: oklch(38.5% 0.178 305.2);
Tailwind
colors: {
  custom: {
    50: '#8f5eaf',
    500: '#5b168d',
    950: '#000000',
  },
}
SCSS
$custom: #5b168d;
$custom-light: #8f5eaf;
$custom-dark: #000000;
JSON
{
  "hex": "#5b168d",
  "rgb": {
    "r": 91,
    "g": 22,
    "b": 141
  },
  "hsl": {
    "h": 274.79,
    "s": 73.006,
    "l": 31.961
  },
  "oklch": {
    "l": 0.38466,
    "c": 0.1785,
    "h": 305.2
  },
  "luminance": 0.04721
}

Semantic roles & 50–950 ramp

primary
#5B168D
secondary
#75C13E
accent
#F03885
background
#F9F5FA
surface
#F1EAF5
border
#CBC6CF
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5B168D

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

Preview Lab → · Contrast checker → · Palette generator →

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