#5B158C#5B158C

#5B158C is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.3% C 0.178 H 305.6°. Best body text is #FFFFFF at 10.88:1 contrast (WCAG AA passes).

Color values

HEX#5B158C
RGBrgb(91, 21, 140)
HSLhsl(275, 74%, 32%)
HSVhsv(275, 85%, 55%)
CMYKcmyk(35%, 85%, 0%, 45.1%)
CIE-LABlab(25.73, 50.68, -50.88)
CIE-LCHlch(25.73, 71.81, 314.89°)
OKLaboklab(38.3% 0.1039 -0.145)
OKLCHoklch(38.3% 0.178 305.6)
XYZxyz(9.3151, 4.6540, 25.2134)
Luminance0.0465 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B158C #468C15
analogous
#20158C #5B158C #8C1582
triadic
#5B158C #8C5B15 #158C5B
tetradic
#5B158C #8C2015 #468C15 #15828C
square
#5B158C #8C2015 #468C15 #15828C
split-complementary
#5B158C #828C15 #158C20
monochromatic
#160522 #380D57 #5B158C #7E1DC1 #9C3AE1

Accessibility & contrast

On white

10.88
#5B158C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5B158C
10.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B158C#FFFFFF#000000##FFFFFF
##5B158C1.0010.881.9310.88
#FFFFFF10.881.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8F
Deuteranopia (green-blind)
#003D8A
Tritanopia (blue-blind)
#523652
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5b158c;
/* rgb */ color: rgb(91, 21, 140);
/* oklch */ color: oklch(38.3% 0.178 305.6);
Tailwind
colors: {
  custom: {
    50: '#8f5daf',
    500: '#5b158c',
    950: '#000000',
  },
}
SCSS
$custom: #5b158c;
$custom-light: #8f5daf;
$custom-dark: #000000;
JSON
{
  "hex": "#5b158c",
  "rgb": {
    "r": 91,
    "g": 21,
    "b": 140
  },
  "hsl": {
    "h": 275.294,
    "s": 73.913,
    "l": 31.569
  },
  "oklch": {
    "l": 0.38301,
    "c": 0.17838,
    "h": 305.6
  },
  "luminance": 0.04654
}

Semantic roles & 50–950 ramp

primary
#5B158C
secondary
#73C03D
accent
#F13784
background
#F9F5FA
surface
#F1E9F5
border
#CBC5CF
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5B158C

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

Preview Lab → · Contrast checker → · Palette generator →

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