#5A337B#5A337B

#5A337B is a dark, vivid violet. Relative luminance 0.060; OKLCH L 40.5% C 0.121 H 306.8°. Best body text is #FFFFFF at 9.57:1 contrast (WCAG AA passes).

Color values

HEX#5A337B
RGBrgb(90, 51, 123)
HSLhsl(273, 41%, 34%)
HSVhsv(273, 59%, 48%)
CMYKcmyk(26.8%, 58.5%, 0%, 51.8%)
CIE-LABlab(29.34, 32.25, -34.40)
CIE-LCHlch(29.34, 47.15, 313.16°)
OKLaboklab(40.45% 0.0724 -0.0968)
OKLCHoklch(40.45% 0.121 306.8)
XYZxyz(8.9747, 5.9715, 19.4149)
Luminance0.0597 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A337B #547B33
analogous
#36337B #5A337B #7B3378
triadic
#5A337B #7B5A33 #337B5A
tetradic
#5A337B #7B3633 #547B33 #33787B
square
#5A337B #7B3633 #547B33 #33787B
split-complementary
#5A337B #787B33 #337B36
monochromatic
#1B0F24 #3A2150 #5A337B #7A45A6 #9868C0

Accessibility & contrast

On white

9.57
#5A337B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A337B
9.57:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A337B#FFFFFF#000000##FFFFFF
##5A337B1.009.572.199.57
#FFFFFF9.571.0021.001.00
#0000002.1921.001.0021.00
##FFFFFF9.571.0021.001.00

Color blindness preview

Protanopia (red-blind)
#19447D
Deuteranopia (green-blind)
#284579
Tritanopia (blue-blind)
#554052
Achromatopsia (no color)
#454545

Design tokens & code

CSS
--color: #5a337b;
/* rgb */ color: rgb(90, 51, 123);
/* oklch */ color: oklch(40.5% 0.121 306.8);
Tailwind
colors: {
  custom: {
    50: '#8b6ca1',
    500: '#5a337b',
    950: '#000000',
  },
}
SCSS
$custom: #5a337b;
$custom-light: #8b6ca1;
$custom-dark: #000000;
JSON
{
  "hex": "#5a337b",
  "rgb": {
    "r": 90,
    "g": 51,
    "b": 123
  },
  "hsl": {
    "h": 272.5,
    "s": 41.379,
    "l": 34.118
  },
  "oklch": {
    "l": 0.4045,
    "c": 0.12092,
    "h": 306.8
  },
  "luminance": 0.05971
}

Semantic roles & 50–950 ramp

primary
#5A337B
secondary
#82A862
accent
#D1578F
background
#F8F6FA
surface
#F0EBF3
border
#CBC6CD
text
#0C070F
muted
#7D7A7F

Preview Lab

Preview with #5A337B

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

Preview Lab → · Contrast checker → · Palette generator →

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