#5B158A#5B158A

#5B158A is a dark, vivid violet. Relative luminance 0.046; OKLCH L 38.1% C 0.176 H 306.3°. Best body text is #FFFFFF at 10.94:1 contrast (WCAG AA passes).

Color values

HEX#5B158A
RGBrgb(91, 21, 138)
HSLhsl(276, 74%, 31%)
HSVhsv(276, 85%, 54%)
CMYKcmyk(34.1%, 84.8%, 0%, 45.9%)
CIE-LABlab(25.55, 50.22, -49.92)
CIE-LCHlch(25.55, 70.81, 315.17°)
OKLaboklab(38.13% 0.1045 -0.1422)
OKLCHoklch(38.13% 0.176 306.3)
XYZxyz(9.1690, 4.5955, 24.4438)
Luminance0.0459 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B158A #448A15
analogous
#20158A #5B158A #8A157E
triadic
#5B158A #8A5B15 #158A5B
tetradic
#5B158A #8A2015 #448A15 #157E8A
square
#5B158A #8A2015 #448A15 #157E8A
split-complementary
#5B158A #7E8A15 #158A20
monochromatic
#150520 #380D55 #5B158A #7E1DBF #9D39E1

Accessibility & contrast

On white

10.94
#5B158A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#5B158A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B158A
10.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B158A#FFFFFF#000000##FFFFFF
##5B158A1.0010.941.9210.94
#FFFFFF10.941.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8D
Deuteranopia (green-blind)
#003D88
Tritanopia (blue-blind)
#523651
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5b158a;
/* rgb */ color: rgb(91, 21, 138);
/* oklch */ color: oklch(38.1% 0.176 306.3);
Tailwind
colors: {
  custom: {
    50: '#8f5dad',
    500: '#5b158a',
    950: '#000000',
  },
}
SCSS
$custom: #5b158a;
$custom-light: #8f5dad;
$custom-dark: #000000;
JSON
{
  "hex": "#5b158a",
  "rgb": {
    "r": 91,
    "g": 21,
    "b": 138
  },
  "hsl": {
    "h": 275.897,
    "s": 73.585,
    "l": 31.176
  },
  "oklch": {
    "l": 0.38125,
    "c": 0.17646,
    "h": 306.3
  },
  "luminance": 0.04595
}

Semantic roles & 50–950 ramp

primary
#5B158A
secondary
#71BE3D
accent
#F03882
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5B158A

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

Preview Lab → · Contrast checker → · Palette generator →

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