#5B337F#5B337F

#5B337F is a dark, vivid violet. Relative luminance 0.061; OKLCH L 40.8% C 0.126 H 305.8°. Best body text is #FFFFFF at 9.44:1 contrast (WCAG AA passes).

Color values

HEX#5B337F
RGBrgb(91, 51, 127)
HSLhsl(272, 43%, 35%)
HSVhsv(272, 60%, 50%)
CMYKcmyk(28.3%, 59.8%, 0%, 50.2%)
CIE-LABlab(29.72, 33.55, -36.29)
CIE-LCHlch(29.72, 49.42, 312.75°)
OKLaboklab(40.84% 0.0739 -0.1023)
OKLCHoklch(40.84% 0.126 305.8)
XYZxyz(9.3282, 6.1242, 20.7652)
Luminance0.0612 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B337F #577F33
analogous
#35337F #5B337F #7F337D
triadic
#5B337F #7F5B33 #337F5B
tetradic
#5B337F #7F3533 #577F33 #337D7F
square
#5B337F #7F3533 #577F33 #337D7F
split-complementary
#5B337F #7D7F33 #337F35
monochromatic
#1C1028 #3C2153 #5B337F #7A45AB #9969C3

Accessibility & contrast

On white

9.44
#5B337F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.22
#5B337F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B337F
9.44:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B337F#FFFFFF#000000##FFFFFF
##5B337F1.009.442.229.44
#FFFFFF9.441.0021.001.00
#0000002.2221.001.0021.00
##FFFFFF9.441.0021.001.00

Color blindness preview

Protanopia (red-blind)
#154581
Deuteranopia (green-blind)
#25467D
Tritanopia (blue-blind)
#554254
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #5b337f;
/* rgb */ color: rgb(91, 51, 127);
/* oklch */ color: oklch(40.8% 0.126 305.8);
Tailwind
colors: {
  custom: {
    50: '#8c6ca4',
    500: '#5b337f',
    950: '#000000',
  },
}
SCSS
$custom: #5b337f;
$custom-light: #8c6ca4;
$custom-dark: #000000;
JSON
{
  "hex": "#5b337f",
  "rgb": {
    "r": 91,
    "g": 51,
    "b": 127
  },
  "hsl": {
    "h": 271.579,
    "s": 42.697,
    "l": 34.902
  },
  "oklch": {
    "l": 0.40842,
    "c": 0.12625,
    "h": 305.8
  },
  "luminance": 0.06124
}

Semantic roles & 50–950 ramp

primary
#5B337F
secondary
#85AB63
accent
#D25591
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C070F
muted
#7D7A7F

Preview Lab

Preview with #5B337F

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

Preview Lab → · Contrast checker → · Palette generator →

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