#5B158F#5B158F

#5B158F is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.6% C 0.181 H 304.6°. Best body text is #FFFFFF at 10.78:1 contrast (WCAG AA passes).

Color values

HEX#5B158F
RGBrgb(91, 21, 143)
HSLhsl(274, 74%, 32%)
HSVhsv(274, 85%, 56%)
CMYKcmyk(36.4%, 85.3%, 0%, 43.9%)
CIE-LABlab(25.99, 51.36, -52.30)
CIE-LCHlch(25.99, 73.31, 314.48°)
OKLaboklab(38.57% 0.1029 -0.1492)
OKLCHoklch(38.57% 0.181 304.6)
XYZxyz(9.5393, 4.7437, 26.3943)
Luminance0.0474 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B158F #498F15
analogous
#1E158F #5B158F #8F1586
triadic
#5B158F #8F5B15 #158F5B
tetradic
#5B158F #8F1E15 #498F15 #15868F
square
#5B158F #8F1E15 #498F15 #15868F
split-complementary
#5B158F #868F15 #158F1E
monochromatic
#170524 #390D5A #5B158F #7D1DC4 #9B3CE2

Accessibility & contrast

On white

10.78
#5B158F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#5B158F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B158F
10.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B158F#FFFFFF#000000##FFFFFF
##5B158F1.0010.781.9510.78
#FFFFFF10.781.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.781.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5b158f;
/* rgb */ color: rgb(91, 21, 143);
/* oklch */ color: oklch(38.6% 0.181 304.6);
Tailwind
colors: {
  custom: {
    50: '#8f5eb1',
    500: '#5b158f',
    950: '#000000',
  },
}
SCSS
$custom: #5b158f;
$custom-light: #8f5eb1;
$custom-dark: #000000;
JSON
{
  "hex": "#5b158f",
  "rgb": {
    "r": 91,
    "g": 21,
    "b": 143
  },
  "hsl": {
    "h": 274.426,
    "s": 74.39,
    "l": 32.157
  },
  "oklch": {
    "l": 0.38567,
    "c": 0.18125,
    "h": 304.6
  },
  "luminance": 0.04744
}

Semantic roles & 50–950 ramp

primary
#5B158F
secondary
#76C23E
accent
#F13786
background
#F9F5FB
surface
#F1E9F6
border
#CBC5D0
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5B158F

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

Preview Lab → · Contrast checker → · Palette generator →

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