#5B168F#5B168F

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

Color values

HEX#5B168F
RGBrgb(91, 22, 143)
HSLhsl(274, 73%, 32%)
HSVhsv(274, 85%, 56%)
CMYKcmyk(36.4%, 84.6%, 0%, 43.9%)
CIE-LABlab(26.10, 51.04, -52.12)
CIE-LCHlch(26.10, 72.95, 314.40°)
OKLaboklab(38.64% 0.1022 -0.1487)
OKLCHoklch(38.64% 0.18 304.5)
XYZxyz(9.5581, 4.7812, 26.4006)
Luminance0.0478 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B168F #4A8F16
analogous
#1F168F #5B168F #8F1686
triadic
#5B168F #8F5B16 #168F5B
tetradic
#5B168F #8F1F16 #4A8F16 #16868F
square
#5B168F #8F1F16 #4A8F16 #16868F
split-complementary
#5B168F #868F16 #168F1F
monochromatic
#170625 #390E5A #5B168F #7D1EC4 #9B3EE1

Accessibility & contrast

On white

10.74
#5B168F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5B168F
10.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B168F#FFFFFF#000000##FFFFFF
##5B168F1.0010.741.9610.74
#FFFFFF10.741.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.741.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5b168f;
/* rgb */ color: rgb(91, 22, 143);
/* oklch */ color: oklch(38.6% 0.180 304.5);
Tailwind
colors: {
  custom: {
    50: '#8f5eb1',
    500: '#5b168f',
    950: '#000000',
  },
}
SCSS
$custom: #5b168f;
$custom-light: #8f5eb1;
$custom-dark: #000000;
JSON
{
  "hex": "#5b168f",
  "rgb": {
    "r": 91,
    "g": 22,
    "b": 143
  },
  "hsl": {
    "h": 274.215,
    "s": 73.333,
    "l": 32.353
  },
  "oklch": {
    "l": 0.38643,
    "c": 0.18043,
    "h": 304.5
  },
  "luminance": 0.04781
}

Semantic roles & 50–950 ramp

primary
#5B168F
secondary
#77C13F
accent
#F03887
background
#F9F5FB
surface
#F1EAF6
border
#CBC6D0
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5B168F

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

Preview Lab → · Contrast checker → · Palette generator →

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