#5B158D#5B158D

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

Color values

HEX#5B158D
RGBrgb(91, 21, 141)
HSLhsl(275, 74%, 32%)
HSVhsv(275, 85%, 55%)
CMYKcmyk(35.5%, 85.1%, 0%, 44.7%)
CIE-LABlab(25.81, 50.90, -51.35)
CIE-LCHlch(25.81, 72.31, 314.75°)
OKLaboklab(38.39% 0.1035 -0.1464)
OKLCHoklch(38.39% 0.179 305.3)
XYZxyz(9.3892, 4.6836, 25.6035)
Luminance0.0468 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B158D #478D15
analogous
#1F158D #5B158D #8D1583
triadic
#5B158D #8D5B15 #158D5B
tetradic
#5B158D #8D1F15 #478D15 #15838D
square
#5B158D #8D1F15 #478D15 #15838D
split-complementary
#5B158D #838D15 #158D1F
monochromatic
#160522 #390D58 #5B158D #7D1DC2 #9C3BE2

Accessibility & contrast

On white

10.84
#5B158D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5B158D
10.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B158D#FFFFFF#000000##FFFFFF
##5B158D1.0010.841.9410.84
#FFFFFF10.841.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.841.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5b158d;
/* rgb */ color: rgb(91, 21, 141);
/* oklch */ color: oklch(38.4% 0.179 305.3);
Tailwind
colors: {
  custom: {
    50: '#8f5daf',
    500: '#5b158d',
    950: '#000000',
  },
}
SCSS
$custom: #5b158d;
$custom-light: #8f5daf;
$custom-dark: #000000;
JSON
{
  "hex": "#5b158d",
  "rgb": {
    "r": 91,
    "g": 21,
    "b": 141
  },
  "hsl": {
    "h": 275,
    "s": 74.074,
    "l": 31.765
  },
  "oklch": {
    "l": 0.38389,
    "c": 0.17933,
    "h": 305.3
  },
  "luminance": 0.04684
}

Semantic roles & 50–950 ramp

primary
#5B158D
secondary
#74C13D
accent
#F13784
background
#F9F5FA
surface
#F1E9F5
border
#CBC5CF
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5B158D

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

Preview Lab → · Contrast checker → · Palette generator →

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