#5A178B#5A178B

#5A178B is a dark, vivid violet. Relative luminance 0.047; OKLCH L 38.2% C 0.175 H 305.2°. Best body text is #FFFFFF at 10.88:1 contrast (WCAG AA passes).

Color values

HEX#5A178B
RGBrgb(90, 23, 139)
HSLhsl(275, 72%, 32%)
HSVhsv(275, 83%, 55%)
CMYKcmyk(35.3%, 83.5%, 0%, 45.5%)
CIE-LABlab(25.72, 49.62, -50.28)
CIE-LCHlch(25.72, 70.64, 314.62°)
OKLaboklab(38.24% 0.1012 -0.1433)
OKLCHoklch(38.24% 0.175 305.2)
XYZxyz(9.1820, 4.6506, 24.8350)
Luminance0.0465 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A178B #488B17
analogous
#20178B #5A178B #8B1782
triadic
#5A178B #8B5A17 #178B5A
tetradic
#5A178B #8B2017 #488B17 #17828B
square
#5A178B #8B2017 #488B17 #17828B
split-complementary
#5A178B #828B17 #178B20
monochromatic
#160622 #380E56 #5A178B #7C20C0 #9B3DDF

Accessibility & contrast

On white

10.88
#5A178B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.93
#5A178B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A178B
10.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A178B#FFFFFF#000000##FFFFFF
##5A178B1.0010.881.9310.88
#FFFFFF10.881.0021.001.00
#0000001.9321.001.0021.00
##FFFFFF10.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8E
Deuteranopia (green-blind)
#003D89
Tritanopia (blue-blind)
#513752
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a178b;
/* rgb */ color: rgb(90, 23, 139);
/* oklch */ color: oklch(38.2% 0.175 305.2);
Tailwind
colors: {
  custom: {
    50: '#8e5eae',
    500: '#5a178b',
    950: '#000000',
  },
}
SCSS
$custom: #5a178b;
$custom-light: #8e5eae;
$custom-dark: #000000;
JSON
{
  "hex": "#5a178b",
  "rgb": {
    "r": 90,
    "g": 23,
    "b": 139
  },
  "hsl": {
    "h": 274.655,
    "s": 71.605,
    "l": 31.765
  },
  "oklch": {
    "l": 0.38235,
    "c": 0.17545,
    "h": 305.2
  },
  "luminance": 0.04651
}

Semantic roles & 50–950 ramp

primary
#5A178B
secondary
#75BF3F
accent
#EE3986
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A178B

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

Preview Lab → · Contrast checker → · Palette generator →

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