#5B339B#5B339B

#5B339B is a dark, vivid violet. Relative luminance 0.070; OKLCH L 42.9% C 0.161 H 296.7°. Best body text is #FFFFFF at 8.78:1 contrast (WCAG AA passes).

Color values

HEX#5B339B
RGBrgb(91, 51, 155)
HSLhsl(263, 50%, 40%)
HSVhsv(263, 67%, 61%)
CMYKcmyk(41.3%, 67.1%, 0%, 39.2%)
CIE-LABlab(31.71, 41.02, -50.36)
CIE-LCHlch(31.71, 64.95, 309.17°)
OKLaboklab(42.92% 0.0723 -0.1437)
OKLCHoklch(42.92% 0.161 296.7)
XYZxyz(11.4131, 6.9581, 31.7457)
Luminance0.0696 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B339B #739B33
analogous
#333F9B #5B339B #8F339B
triadic
#5B339B #9B5B33 #339B5B
tetradic
#5B339B #9B333F #739B33 #339B8F
square
#5B339B #9B333F #739B33 #339B8F
split-complementary
#5B339B #9B8F33 #3F9B33
monochromatic
#25153F #40246D #5B339B #7748C3 #9A76D2

Accessibility & contrast

On white

8.78
#5B339B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.39
#5B339B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B339B
8.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B339B#FFFFFF#000000##FFFFFF
##5B339B1.008.782.398.78
#FFFFFF8.781.0021.001.00
#0000002.3921.001.0021.00
##FFFFFF8.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004B9E
Deuteranopia (green-blind)
#004999
Tritanopia (blue-blind)
#4B4B62
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #5b339b;
/* rgb */ color: rgb(91, 51, 155);
/* oklch */ color: oklch(42.9% 0.161 296.7);
Tailwind
colors: {
  custom: {
    50: '#8f6db9',
    500: '#5b339b',
    950: '#000000',
  },
}
SCSS
$custom: #5b339b;
$custom-light: #8f6db9;
$custom-dark: #000000;
JSON
{
  "hex": "#5b339b",
  "rgb": {
    "r": 91,
    "g": 51,
    "b": 155
  },
  "hsl": {
    "h": 263.077,
    "s": 50.485,
    "l": 40.392
  },
  "oklch": {
    "l": 0.42917,
    "c": 0.16083,
    "h": 296.7
  },
  "luminance": 0.06958
}

Semantic roles & 50–950 ramp

primary
#5B339B
secondary
#9EBA6F
accent
#DA4EA4
background
#F9F6FB
surface
#F1ECF6
border
#CBC7D0
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5B339B

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

Preview Lab → · Contrast checker → · Palette generator →

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