#5B2158#5B2158

#5B2158 is a dark, moderate purple. Relative luminance 0.040; OKLCH L 35.7% C 0.113 H 329.7°. Best body text is #FFFFFF at 11.65:1 contrast (WCAG AA passes).

Color values

HEX#5B2158
RGBrgb(91, 33, 88)
HSLhsl(303, 47%, 24%)
HSVhsv(303, 64%, 36%)
CMYKcmyk(0%, 63.7%, 3.3%, 64.3%)
CIE-LABlab(23.73, 34.48, -20.70)
CIE-LCHlch(23.73, 40.21, 329.02°)
OKLaboklab(35.7% 0.0973 -0.0569)
OKLCHoklch(35.7% 0.113 329.7)
XYZxyz(6.6196, 4.0169, 9.6573)
Luminance0.0402 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B2158 #215B24
analogous
#41215B #5B2158 #5B213B
triadic
#5B2158 #585B21 #21585B
tetradic
#5B2158 #5B4121 #215B24 #213B5B
square
#5B2158 #5B4121 #215B24 #213B5B
split-complementary
#5B2158 #3B5B21 #215B41
monochromatic
#160816 #2E112D #5B2158 #883183 #B542AF

Accessibility & contrast

On white

11.65
#5B2158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.80
#5B2158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B2158
11.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B2158#FFFFFF#000000##FFFFFF
##5B21581.0011.651.8011.65
#FFFFFF11.651.0021.001.00
#0000001.8021.001.0021.00
##FFFFFF11.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#1D335A
Deuteranopia (green-blind)
#303B56
Tritanopia (blue-blind)
#5E2739
Achromatopsia (no color)
#383838

Design tokens & code

CSS
--color: #5b2158;
/* rgb */ color: rgb(91, 33, 88);
/* oklch */ color: oklch(35.7% 0.113 329.7);
Tailwind
colors: {
  custom: {
    50: '#8b6087',
    500: '#5b2158',
    950: '#000000',
  },
}
SCSS
$custom: #5b2158;
$custom-light: #8b6087;
$custom-dark: #000000;
JSON
{
  "hex": "#5b2158",
  "rgb": {
    "r": 91,
    "g": 33,
    "b": 88
  },
  "hsl": {
    "h": 303.103,
    "s": 46.774,
    "l": 24.314
  },
  "oklch": {
    "l": 0.35698,
    "c": 0.11269,
    "h": 329.7
  },
  "luminance": 0.04016
}

Semantic roles & 50–950 ramp

primary
#5B2158
secondary
#498F4C
accent
#D65851
background
#F8F5F8
surface
#F0EAEF
border
#CBC6CA
text
#0C050B
muted
#7D797C

Preview Lab

Preview with #5B2158

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

Preview Lab → · Contrast checker → · Palette generator →

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