#5B317E#5B317E

#5B317E is a dark, vivid violet. Relative luminance 0.059; OKLCH L 40.5% C 0.128 H 306.7°. Best body text is #FFFFFF at 9.61:1 contrast (WCAG AA passes).

Color values

HEX#5B317E
RGBrgb(91, 49, 126)
HSLhsl(273, 44%, 34%)
HSVhsv(273, 61%, 49%)
CMYKcmyk(27.8%, 61.1%, 0%, 50.6%)
CIE-LABlab(29.23, 34.44, -36.45)
CIE-LCHlch(29.23, 50.15, 313.37°)
OKLaboklab(40.46% 0.0767 -0.1028)
OKLCHoklch(40.46% 0.128 306.7)
XYZxyz(9.1778, 5.9272, 20.3952)
Luminance0.0593 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5B317E #547E31
analogous
#35317E #5B317E #7E317B
triadic
#5B317E #7E5B31 #317E5B
tetradic
#5B317E #7E3531 #547E31 #317B7E
square
#5B317E #7E3531 #547E31 #317B7E
split-complementary
#5B317E #7B7E31 #317E35
monochromatic
#1B0F26 #3B2052 #5B317E #7B42AA #9966C3

Accessibility & contrast

On white

9.61
#5B317E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.19
#5B317E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5B317E
9.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5B317E#FFFFFF#000000##FFFFFF
##5B317E1.009.612.199.61
#FFFFFF9.611.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#114380
Deuteranopia (green-blind)
#24457C
Tritanopia (blue-blind)
#554052
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #5b317e;
/* rgb */ color: rgb(91, 49, 126);
/* oklch */ color: oklch(40.5% 0.128 306.7);
Tailwind
colors: {
  custom: {
    50: '#8c6ba4',
    500: '#5b317e',
    950: '#000000',
  },
}
SCSS
$custom: #5b317e;
$custom-light: #8c6ba4;
$custom-dark: #000000;
JSON
{
  "hex": "#5b317e",
  "rgb": {
    "r": 91,
    "g": 49,
    "b": 126
  },
  "hsl": {
    "h": 272.727,
    "s": 44,
    "l": 34.314
  },
  "oklch": {
    "l": 0.40459,
    "c": 0.12825,
    "h": 306.7
  },
  "luminance": 0.05927
}

Semantic roles & 50–950 ramp

primary
#5B317E
secondary
#82AB60
accent
#D4548E
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C070F
muted
#7D7A7F

Preview Lab

Preview with #5B317E

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

Preview Lab → · Contrast checker → · Palette generator →

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