#5A337E#5A337E

#5A337E is a dark, vivid violet. Relative luminance 0.060; OKLCH L 40.7% C 0.125 H 305.5°. Best body text is #FFFFFF at 9.50:1 contrast (WCAG AA passes).

Color values

HEX#5A337E
RGBrgb(90, 51, 126)
HSLhsl(271, 42%, 35%)
HSVhsv(271, 60%, 49%)
CMYKcmyk(28.6%, 59.5%, 0%, 50.6%)
CIE-LABlab(29.53, 33.02, -35.97)
CIE-LCHlch(29.53, 48.83, 312.55°)
OKLaboklab(40.65% 0.0725 -0.1015)
OKLCHoklch(40.65% 0.125 305.5)
XYZxyz(9.1654, 6.0477, 20.4191)
Luminance0.0605 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A337E #577E33
analogous
#35337E #5A337E #7E337D
triadic
#5A337E #7E5A33 #337E5A
tetradic
#5A337E #7E3533 #577E33 #337D7E
square
#5A337E #7E3533 #577E33 #337D7E
split-complementary
#5A337E #7D7E33 #337E35
monochromatic
#1C1027 #3B2152 #5A337E #7945AA #9769C2

Accessibility & contrast

On white

9.50
#5A337E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.21
#5A337E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A337E
9.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A337E#FFFFFF#000000##FFFFFF
##5A337E1.009.502.219.50
#FFFFFF9.501.0021.001.00
#0000002.2121.001.0021.00
##FFFFFF9.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#154480
Deuteranopia (green-blind)
#25467C
Tritanopia (blue-blind)
#544153
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #5a337e;
/* rgb */ color: rgb(90, 51, 126);
/* oklch */ color: oklch(40.7% 0.125 305.5);
Tailwind
colors: {
  custom: {
    50: '#8b6ca4',
    500: '#5a337e',
    950: '#000000',
  },
}
SCSS
$custom: #5a337e;
$custom-light: #8b6ca4;
$custom-dark: #000000;
JSON
{
  "hex": "#5a337e",
  "rgb": {
    "r": 90,
    "g": 51,
    "b": 126
  },
  "hsl": {
    "h": 271.2,
    "s": 42.373,
    "l": 34.706
  },
  "oklch": {
    "l": 0.40653,
    "c": 0.1247,
    "h": 305.5
  },
  "luminance": 0.06048
}

Semantic roles & 50–950 ramp

primary
#5A337E
secondary
#85AA63
accent
#D25691
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C070F
muted
#7D7A7F

Preview Lab

Preview with #5A337E

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

Preview Lab → · Contrast checker → · Palette generator →

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