#5A178F#5A178F

#5A178F is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.6% C 0.179 H 303.9°. Best body text is #FFFFFF at 10.75:1 contrast (WCAG AA passes).

Color values

HEX#5A178F
RGBrgb(90, 23, 143)
HSLhsl(274, 72%, 33%)
HSVhsv(274, 84%, 56%)
CMYKcmyk(37.1%, 83.9%, 0%, 43.9%)
CIE-LABlab(26.07, 50.55, -52.19)
CIE-LCHlch(26.07, 72.65, 314.09°)
OKLaboklab(38.59% 0.1 -0.1489)
OKLCHoklch(38.59% 0.179 303.9)
XYZxyz(9.4796, 4.7696, 26.4025)
Luminance0.0477 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A178F #4C8F17
analogous
#1E178F #5A178F #8F1788
triadic
#5A178F #8F5A17 #178F5A
tetradic
#5A178F #8F1E17 #4C8F17 #17888F
square
#5A178F #8F1E17 #4C8F17 #17888F
split-complementary
#5A178F #888F17 #178F1E
monochromatic
#180626 #390F5A #5A178F #7B1FC4 #9A40E0

Accessibility & contrast

On white

10.75
#5A178F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A178F
10.75:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A178F#FFFFFF#000000##FFFFFF
##5A178F1.0010.751.9510.75
#FFFFFF10.751.0021.001.00
#0000001.9521.001.0021.00
##FFFFFF10.751.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C92
Deuteranopia (green-blind)
#003E8D
Tritanopia (blue-blind)
#4F3955
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #5a178f;
/* rgb */ color: rgb(90, 23, 143);
/* oklch */ color: oklch(38.6% 0.179 303.9);
Tailwind
colors: {
  custom: {
    50: '#8e5eb1',
    500: '#5a178f',
    950: '#000000',
  },
}
SCSS
$custom: #5a178f;
$custom-light: #8e5eb1;
$custom-dark: #000000;
JSON
{
  "hex": "#5a178f",
  "rgb": {
    "r": 90,
    "g": 23,
    "b": 143
  },
  "hsl": {
    "h": 273.5,
    "s": 72.289,
    "l": 32.549
  },
  "oklch": {
    "l": 0.38589,
    "c": 0.17937,
    "h": 303.9
  },
  "luminance": 0.0477
}

Semantic roles & 50–950 ramp

primary
#5A178F
secondary
#79C141
accent
#EF3989
background
#F9F5FB
surface
#F1EAF6
border
#CBC6D0
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5A178F

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

Preview Lab → · Contrast checker → · Palette generator →

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