#5B158E#5B158E

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

Color values

HEX#5B158E
RGBrgb(91, 21, 142)
HSLhsl(275, 74%, 32%)
HSVhsv(275, 85%, 56%)
CMYKcmyk(35.9%, 85.2%, 0%, 44.3%)
CIE-LABlab(25.90, 51.13, -51.83)
CIE-LCHlch(25.90, 72.81, 314.61°)
OKLaboklab(38.48% 0.1032 -0.1478)
OKLCHoklch(38.48% 0.18 304.9)
XYZxyz(9.4639, 4.7135, 25.9972)
Luminance0.0471 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B158E #488E15
analogous
#1F158E #5B158E #8E1585
triadic
#5B158E #8E5B15 #158E5B
tetradic
#5B158E #8E1F15 #488E15 #15858E
square
#5B158E #8E1F15 #488E15 #15858E
split-complementary
#5B158E #858E15 #158E1F
monochromatic
#170523 #390D59 #5B158E #7D1DC3 #9C3BE2

Accessibility & contrast

On white

10.81
#5B158E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5B158E
10.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B158E#FFFFFF#000000##FFFFFF
##5B158E1.0010.811.9410.81
#FFFFFF10.811.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C91
Deuteranopia (green-blind)
#003D8C
Tritanopia (blue-blind)
#513754
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5b158e;
/* rgb */ color: rgb(91, 21, 142);
/* oklch */ color: oklch(38.5% 0.180 304.9);
Tailwind
colors: {
  custom: {
    50: '#8f5db0',
    500: '#5b158e',
    950: '#000000',
  },
}
SCSS
$custom: #5b158e;
$custom-light: #8f5db0;
$custom-dark: #000000;
JSON
{
  "hex": "#5b158e",
  "rgb": {
    "r": 91,
    "g": 21,
    "b": 142
  },
  "hsl": {
    "h": 274.711,
    "s": 74.233,
    "l": 31.961
  },
  "oklch": {
    "l": 0.38478,
    "c": 0.18029,
    "h": 304.9
  },
  "luminance": 0.04713
}

Semantic roles & 50–950 ramp

primary
#5B158E
secondary
#75C23D
accent
#F13785
background
#F9F5FA
surface
#F1E9F5
border
#CBC5CF
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5B158E

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

Preview Lab → · Contrast checker → · Palette generator →

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