#5A178A#5A178A

#5A178A is a dark, vivid violet. Relative luminance 0.046; OKLCH L 38.1% C 0.174 H 305.6°. Best body text is #FFFFFF at 10.91:1 contrast (WCAG AA passes).

Color values

HEX#5A178A
RGBrgb(90, 23, 138)
HSLhsl(275, 71%, 32%)
HSVhsv(275, 83%, 54%)
CMYKcmyk(34.8%, 83.3%, 0%, 45.9%)
CIE-LABlab(25.63, 49.38, -49.79)
CIE-LCHlch(25.63, 70.13, 314.76°)
OKLaboklab(38.15% 0.1015 -0.1419)
OKLCHoklch(38.15% 0.174 305.6)
XYZxyz(9.1093, 4.6215, 24.4520)
Luminance0.0462 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A178A #478A17
analogous
#21178A #5A178A #8A1781
triadic
#5A178A #8A5A17 #178A5A
tetradic
#5A178A #8A2117 #478A17 #17818A
square
#5A178A #8A2117 #478A17 #17818A
split-complementary
#5A178A #818A17 #178A21
monochromatic
#160621 #380E56 #5A178A #7C20BE #9B3DDF

Accessibility & contrast

On white

10.91
#5A178A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#5A178A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A178A
10.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A178A#FFFFFF#000000##FFFFFF
##5A178A1.0010.911.9210.91
#FFFFFF10.911.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8D
Deuteranopia (green-blind)
#003D88
Tritanopia (blue-blind)
#513652
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a178a;
/* rgb */ color: rgb(90, 23, 138);
/* oklch */ color: oklch(38.1% 0.174 305.6);
Tailwind
colors: {
  custom: {
    50: '#8e5ead',
    500: '#5a178a',
    950: '#000000',
  },
}
SCSS
$custom: #5a178a;
$custom-light: #8e5ead;
$custom-dark: #000000;
JSON
{
  "hex": "#5a178a",
  "rgb": {
    "r": 90,
    "g": 23,
    "b": 138
  },
  "hsl": {
    "h": 274.957,
    "s": 71.429,
    "l": 31.569
  },
  "oklch": {
    "l": 0.38147,
    "c": 0.17448,
    "h": 305.6
  },
  "luminance": 0.04621
}

Semantic roles & 50–950 ramp

primary
#5A178A
secondary
#74BE3F
accent
#EE3A85
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A178A

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

Preview Lab → · Contrast checker → · Palette generator →

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