#5B337D#5B337D

#5B337D is a dark, vivid violet. Relative luminance 0.061; OKLCH L 40.7% C 0.124 H 306.7°. Best body text is #FFFFFF at 9.48:1 contrast (WCAG AA passes).

Color values

HEX#5B337D
RGBrgb(91, 51, 125)
HSLhsl(272, 42%, 35%)
HSVhsv(272, 59%, 49%)
CMYKcmyk(27.2%, 59.2%, 0%, 51%)
CIE-LABlab(29.59, 33.04, -35.24)
CIE-LCHlch(29.59, 48.30, 313.15°)
OKLaboklab(40.71% 0.0739 -0.0993)
OKLCHoklch(40.71% 0.124 306.7)
XYZxyz(9.1991, 6.0726, 20.0856)
Luminance0.0607 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B337D #557D33
analogous
#36337D #5B337D #7D337A
triadic
#5B337D #7D5B33 #337D5B
tetradic
#5B337D #7D3633 #557D33 #337A7D
square
#5B337D #7D3633 #557D33 #337A7D
split-complementary
#5B337D #7A7D33 #337D36
monochromatic
#1C1026 #3B2152 #5B337D #7B45A8 #9969C2

Accessibility & contrast

On white

9.48
#5B337D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.21
#5B337D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B337D
9.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B337D#FFFFFF#000000##FFFFFF
##5B337D1.009.482.219.48
#FFFFFF9.481.0021.001.00
#0000002.2121.001.0021.00
##FFFFFF9.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#17447F
Deuteranopia (green-blind)
#27467B
Tritanopia (blue-blind)
#564153
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #5b337d;
/* rgb */ color: rgb(91, 51, 125);
/* oklch */ color: oklch(40.7% 0.124 306.7);
Tailwind
colors: {
  custom: {
    50: '#8c6ca3',
    500: '#5b337d',
    950: '#000000',
  },
}
SCSS
$custom: #5b337d;
$custom-light: #8c6ca3;
$custom-dark: #000000;
JSON
{
  "hex": "#5b337d",
  "rgb": {
    "r": 91,
    "g": 51,
    "b": 125
  },
  "hsl": {
    "h": 272.432,
    "s": 42.045,
    "l": 34.51
  },
  "oklch": {
    "l": 0.40706,
    "c": 0.12375,
    "h": 306.7
  },
  "luminance": 0.06072
}

Semantic roles & 50–950 ramp

primary
#5B337D
secondary
#83AA62
accent
#D2568F
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C070F
muted
#7D7A7F

Preview Lab

Preview with #5B337D

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

Preview Lab → · Contrast checker → · Palette generator →

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