#5B1987#5B1987

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

Color values

HEX#5B1987
RGBrgb(91, 25, 135)
HSLhsl(276, 69%, 31%)
HSVhsv(276, 81%, 53%)
CMYKcmyk(32.6%, 81.5%, 0%, 47.1%)
CIE-LABlab(25.77, 48.14, -47.68)
CIE-LCHlch(25.77, 67.76, 315.28°)
OKLaboklab(38.2% 0.1022 -0.1357)
OKLCHoklch(38.2% 0.17 307)
XYZxyz(9.0342, 4.6688, 23.3422)
Luminance0.0467 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B1987 #458719
analogous
#241987 #5B1987 #87197C
triadic
#5B1987 #875B19 #19875B
tetradic
#5B1987 #872419 #458719 #197C87
square
#5B1987 #872419 #458719 #197C87
split-complementary
#5B1987 #7C8719 #198724
monochromatic
#150620 #380F53 #5B1987 #7E23BB #9D3FDB

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##5B1987#FFFFFF#000000##FFFFFF
##5B19871.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)
#003B8A
Deuteranopia (green-blind)
#003D85
Tritanopia (blue-blind)
#533650
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5b1987;
/* rgb */ color: rgb(91, 25, 135);
/* oklch */ color: oklch(38.2% 0.170 307.0);
Tailwind
colors: {
  custom: {
    50: '#8e5fab',
    500: '#5b1987',
    950: '#000000',
  },
}
SCSS
$custom: #5b1987;
$custom-light: #8e5fab;
$custom-dark: #000000;
JSON
{
  "hex": "#5b1987",
  "rgb": {
    "r": 91,
    "g": 25,
    "b": 135
  },
  "hsl": {
    "h": 276,
    "s": 68.75,
    "l": 31.373
  },
  "oklch": {
    "l": 0.38198,
    "c": 0.16989,
    "h": 307
  },
  "luminance": 0.04669
}

Semantic roles & 50–950 ramp

primary
#5B1987
secondary
#72BA41
accent
#EC3C82
background
#F9F5FA
surface
#F1EAF4
border
#CBC6CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5B1987

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

Preview Lab → · Contrast checker → · Palette generator →

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