#5B408D#5B408D

#5B408D is a dark, vivid violet. Relative luminance 0.078; OKLCH L 44.0% C 0.123 H 297.2°. Best body text is #FFFFFF at 8.19:1 contrast (WCAG AA passes).

Color values

HEX#5B408D
RGBrgb(91, 64, 141)
HSLhsl(261, 38%, 40%)
HSVhsv(261, 55%, 55%)
CMYKcmyk(35.5%, 54.6%, 0%, 44.7%)
CIE-LABlab(33.59, 29.56, -38.77)
CIE-LCHlch(33.59, 48.76, 307.32°)
OKLaboklab(43.98% 0.0565 -0.1097)
OKLCHoklch(43.98% 0.123 297.2)
XYZxyz(10.9543, 7.8139, 26.1252)
Luminance0.0781 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B408D #728D40
analogous
#404B8D #5B408D #81408D
triadic
#5B408D #8D5B40 #408D5B
tetradic
#5B408D #8D404B #728D40 #408D81
square
#5B408D #8D404B #728D40 #408D81
split-complementary
#5B408D #8D8140 #4B8D40
monochromatic
#251A39 #402D63 #5B408D #7757B3 #9981C6

Accessibility & contrast

On white

8.19
#5B408D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.56
#5B408D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B408D
8.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B408D#FFFFFF#000000##FFFFFF
##5B408D1.008.192.568.19
#FFFFFF8.191.0021.001.00
#0000002.5621.001.0021.00
##FFFFFF8.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#214F90
Deuteranopia (green-blind)
#294E8B
Tritanopia (blue-blind)
#504F60
Achromatopsia (no color)
#4F4F4F

Design tokens & code

CSS
--color: #5b408d;
/* rgb */ color: rgb(91, 64, 141);
/* oklch */ color: oklch(44.0% 0.123 297.2);
Tailwind
colors: {
  custom: {
    50: '#8c75af',
    500: '#5b408d',
    950: '#000000',
  },
}
SCSS
$custom: #5b408d;
$custom-light: #8c75af;
$custom-dark: #000000;
JSON
{
  "hex": "#5b408d",
  "rgb": {
    "r": 91,
    "g": 64,
    "b": 141
  },
  "hsl": {
    "h": 261.039,
    "s": 37.561,
    "l": 40.196
  },
  "oklch": {
    "l": 0.4398,
    "c": 0.12336,
    "h": 297.2
  },
  "luminance": 0.07814
}

Semantic roles & 50–950 ramp

primary
#5B408D
secondary
#9DB078
accent
#CE5AA5
background
#F8F7FA
surface
#F0EDF4
border
#CBC8CE
text
#0C0810
muted
#7D7B7F

Preview Lab

Preview with #5B408D

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

Preview Lab → · Contrast checker → · Palette generator →

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