#5A178E#5A178E

#5A178E is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.5% C 0.178 H 304.2°. Best body text is #FFFFFF at 10.78:1 contrast (WCAG AA passes).

Color values

HEX#5A178E
RGBrgb(90, 23, 142)
HSLhsl(274, 72%, 32%)
HSVhsv(274, 84%, 56%)
CMYKcmyk(36.6%, 83.8%, 0%, 44.3%)
CIE-LABlab(25.98, 50.31, -51.71)
CIE-LCHlch(25.98, 72.15, 314.22°)
OKLaboklab(38.5% 0.1003 -0.1475)
OKLCHoklch(38.5% 0.178 304.2)
XYZxyz(9.4042, 4.7395, 26.0053)
Luminance0.0474 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A178E #4B8E17
analogous
#1F178E #5A178E #8E1786
triadic
#5A178E #8E5A17 #178E5A
tetradic
#5A178E #8E1F17 #4B8E17 #17868E
square
#5A178E #8E1F17 #4B8E17 #17868E
split-complementary
#5A178E #868E17 #178E1F
monochromatic
#170625 #390E59 #5A178E #7B20C3 #9A3FE0

Accessibility & contrast

On white

10.78
#5A178E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.95
#5A178E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A178E
10.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A178E#FFFFFF#000000##FFFFFF
##5A178E1.0010.781.9510.78
#FFFFFF10.781.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C91
Deuteranopia (green-blind)
#003D8C
Tritanopia (blue-blind)
#503854
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a178e;
/* rgb */ color: rgb(90, 23, 142);
/* oklch */ color: oklch(38.5% 0.178 304.2);
Tailwind
colors: {
  custom: {
    50: '#8e5eb0',
    500: '#5a178e',
    950: '#000000',
  },
}
SCSS
$custom: #5a178e;
$custom-light: #8e5eb0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a178e",
  "rgb": {
    "r": 90,
    "g": 23,
    "b": 142
  },
  "hsl": {
    "h": 273.782,
    "s": 72.121,
    "l": 32.353
  },
  "oklch": {
    "l": 0.385,
    "c": 0.17838,
    "h": 304.2
  },
  "luminance": 0.04739
}

Semantic roles & 50–950 ramp

primary
#5A178E
secondary
#78C040
accent
#EF3988
background
#F9F5FA
surface
#F1EAF5
border
#CBC6CF
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5A178E

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

Preview Lab → · Contrast checker → · Palette generator →

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