#5B398D#5B398D

#5B398D is a dark, vivid violet. Relative luminance 0.071; OKLCH L 42.8% C 0.135 H 299.3°. Best body text is #FFFFFF at 8.70:1 contrast (WCAG AA passes).

Color values

HEX#5B398D
RGBrgb(91, 57, 141)
HSLhsl(264, 42%, 39%)
HSVhsv(264, 60%, 55%)
CMYKcmyk(35.5%, 59.6%, 0%, 44.7%)
CIE-LABlab(31.97, 33.77, -41.37)
CIE-LCHlch(31.97, 53.40, 309.22°)
OKLaboklab(42.79% 0.0659 -0.1173)
OKLCHoklch(42.79% 0.135 299.3)
XYZxyz(10.5841, 7.0734, 26.0018)
Luminance0.0707 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B398D #6B8D39
analogous
#39418D #5B398D #85398D
triadic
#5B398D #8D5B39 #398D5B
tetradic
#5B398D #8D3941 #6B8D39 #398D85
square
#5B398D #8D3941 #6B8D39 #398D85
split-complementary
#5B398D #8D8539 #418D39
monochromatic
#231636 #3F2761 #5B398D #774CB7 #9978C8

Accessibility & contrast

On white

8.70
#5B398D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.41
#5B398D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B398D
8.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B398D#FFFFFF#000000##FFFFFF
##5B398D1.008.702.418.70
#FFFFFF8.701.0021.001.00
#0000002.4121.001.0021.00
##FFFFFF8.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0E4B90
Deuteranopia (green-blind)
#1E4B8B
Tritanopia (blue-blind)
#504A5D
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #5b398d;
/* rgb */ color: rgb(91, 57, 141);
/* oklch */ color: oklch(42.8% 0.135 299.3);
Tailwind
colors: {
  custom: {
    50: '#8d71af',
    500: '#5b398d',
    950: '#000000',
  },
}
SCSS
$custom: #5b398d;
$custom-light: #8d71af;
$custom-dark: #000000;
JSON
{
  "hex": "#5b398d",
  "rgb": {
    "r": 91,
    "g": 57,
    "b": 141
  },
  "hsl": {
    "h": 264.286,
    "s": 42.424,
    "l": 38.824
  },
  "oklch": {
    "l": 0.42787,
    "c": 0.13452,
    "h": 299.3
  },
  "luminance": 0.07073
}

Semantic roles & 50–950 ramp

primary
#5B398D
secondary
#97B270
accent
#D256A0
background
#F8F6FA
surface
#F0ECF4
border
#CBC7CE
text
#0C0810
muted
#7D7B7F

Preview Lab

Preview with #5B398D

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

Preview Lab → · Contrast checker → · Palette generator →

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