#5A178C#5A178C

#5A178C is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.3% C 0.176 H 304.9°. Best body text is #FFFFFF at 10.85:1 contrast (WCAG AA passes).

Color values

HEX#5A178C
RGBrgb(90, 23, 140)
HSLhsl(274, 72%, 32%)
HSVhsv(274, 84%, 55%)
CMYKcmyk(35.7%, 83.6%, 0%, 45.1%)
CIE-LABlab(25.80, 49.85, -50.76)
CIE-LCHlch(25.80, 71.14, 314.48°)
OKLaboklab(38.32% 0.1009 -0.1447)
OKLCHoklch(38.32% 0.176 304.9)
XYZxyz(9.2554, 4.6800, 25.2216)
Luminance0.0468 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A178C #498C17
analogous
#20178C #5A178C #8C1784
triadic
#5A178C #8C5A17 #178C5A
tetradic
#5A178C #8C2017 #498C17 #17848C
square
#5A178C #8C2017 #498C17 #17848C
split-complementary
#5A178C #848C17 #178C20
monochromatic
#160623 #380E57 #5A178C #7C20C1 #9A3EDF

Accessibility & contrast

On white

10.85
#5A178C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.94
#5A178C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A178C
10.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A178C#FFFFFF#000000##FFFFFF
##5A178C1.0010.851.9410.85
#FFFFFF10.851.0021.001.00
#0000001.9421.001.0021.00
##FFFFFF10.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8F
Deuteranopia (green-blind)
#003D8A
Tritanopia (blue-blind)
#503753
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a178c;
/* rgb */ color: rgb(90, 23, 140);
/* oklch */ color: oklch(38.3% 0.176 304.9);
Tailwind
colors: {
  custom: {
    50: '#8e5eaf',
    500: '#5a178c',
    950: '#000000',
  },
}
SCSS
$custom: #5a178c;
$custom-light: #8e5eaf;
$custom-dark: #000000;
JSON
{
  "hex": "#5a178c",
  "rgb": {
    "r": 90,
    "g": 23,
    "b": 140
  },
  "hsl": {
    "h": 274.359,
    "s": 71.779,
    "l": 31.961
  },
  "oklch": {
    "l": 0.38323,
    "c": 0.17643,
    "h": 304.9
  },
  "luminance": 0.0468
}

Semantic roles & 50–950 ramp

primary
#5A178C
secondary
#76BF3F
accent
#EF3987
background
#F9F5FA
surface
#F1EAF4
border
#CBC6CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A178C

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

Preview Lab → · Contrast checker → · Palette generator →

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