#5B157F#5B157F

#5B157F is a dark, vivid violet. Relative luminance 0.043; OKLCH L 37.2% C 0.166 H 310.4°. Best body text is #FFFFFF at 11.30:1 contrast (WCAG AA passes).

Color values

HEX#5B157F
RGBrgb(91, 21, 127)
HSLhsl(280, 72%, 29%)
HSVhsv(280, 83%, 50%)
CMYKcmyk(28.3%, 83.5%, 0%, 50.2%)
CIE-LABlab(24.62, 47.75, -44.52)
CIE-LCHlch(24.62, 65.29, 317.00°)
OKLaboklab(37.19% 0.1076 -0.1264)
OKLCHoklch(37.19% 0.166 310.4)
XYZxyz(8.4126, 4.2930, 20.4600)
Luminance0.0429 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B157F #397F15
analogous
#26157F #5B157F #7F156E
triadic
#5B157F #7F5B15 #157F5B
tetradic
#5B157F #7F2615 #397F15 #156E7F
square
#5B157F #7F2615 #397F15 #156E7F
split-complementary
#5B157F #6E7F15 #157F26
monochromatic
#13041A #350C4A #5B157F #811EB4 #A331DD

Accessibility & contrast

On white

11.30
#5B157F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.86
#5B157F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B157F
11.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B157F#FFFFFF#000000##FFFFFF
##5B157F1.0011.301.8611.30
#FFFFFF11.301.0021.001.00
#0000001.8621.001.0021.00
##FFFFFF11.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003882
Deuteranopia (green-blind)
#003B7D
Tritanopia (blue-blind)
#56304B
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #5b157f;
/* rgb */ color: rgb(91, 21, 127);
/* oklch */ color: oklch(37.2% 0.166 310.4);
Tailwind
colors: {
  custom: {
    50: '#8e5da5',
    500: '#5b157f',
    950: '#000000',
  },
}
SCSS
$custom: #5b157f;
$custom-light: #8e5da5;
$custom-dark: #000000;
JSON
{
  "hex": "#5b157f",
  "rgb": {
    "r": 91,
    "g": 21,
    "b": 127
  },
  "hsl": {
    "h": 279.623,
    "s": 71.622,
    "l": 29.02
  },
  "oklch": {
    "l": 0.37186,
    "c": 0.16597,
    "h": 310.4
  },
  "luminance": 0.04293
}

Semantic roles & 50–950 ramp

primary
#5B157F
secondary
#65B43C
accent
#EE3977
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D050F
muted
#7E797F

Preview Lab

Preview with #5B157F

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

Preview Lab → · Contrast checker → · Palette generator →

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