#5A1978#5A1978

#5A1978 is a dark, vivid purple. Relative luminance 0.042; OKLCH L 36.8% C 0.155 H 312.3°. Best body text is #FFFFFF at 11.38:1 contrast (WCAG AA passes).

Color values

HEX#5A1978
RGBrgb(90, 25, 120)
HSLhsl(281, 66%, 28%)
HSVhsv(281, 79%, 47%)
CMYKcmyk(25%, 79.2%, 0%, 52.9%)
CIE-LABlab(24.40, 44.55, -40.44)
CIE-LCHlch(24.40, 60.16, 317.77°)
OKLaboklab(36.83% 0.1043 -0.1144)
OKLCHoklch(36.83% 0.155 312.3)
XYZxyz(7.9536, 4.2252, 18.1622)
Luminance0.0423 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1978 #377819
analogous
#2B1978 #5A1978 #781966
triadic
#5A1978 #785A19 #19785A
tetradic
#5A1978 #782B19 #377819 #196678
square
#5A1978 #782B19 #377819 #196678
split-complementary
#5A1978 #667819 #19782B
monochromatic
#130519 #340E45 #5A1978 #8024AB #A336D5

Accessibility & contrast

On white

11.38
#5A1978 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#5A1978 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1978
11.38:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1978#FFFFFF#000000##FFFFFF
##5A19781.0011.381.8511.38
#FFFFFF11.381.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.381.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00377B
Deuteranopia (green-blind)
#0A3B76
Tritanopia (blue-blind)
#562F48
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #5a1978;
/* rgb */ color: rgb(90, 25, 120);
/* oklch */ color: oklch(36.8% 0.155 312.3);
Tailwind
colors: {
  custom: {
    50: '#8c5ea0',
    500: '#5a1978',
    950: '#000000',
  },
}
SCSS
$custom: #5a1978;
$custom-light: #8c5ea0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1978",
  "rgb": {
    "r": 90,
    "g": 25,
    "b": 120
  },
  "hsl": {
    "h": 281.053,
    "s": 65.517,
    "l": 28.431
  },
  "oklch": {
    "l": 0.36827,
    "c": 0.1548,
    "h": 312.3
  },
  "luminance": 0.04225
}

Semantic roles & 50–950 ramp

primary
#5A1978
secondary
#62AD40
accent
#E83F75
background
#F8F5F9
surface
#F0E9F2
border
#CBC5CC
text
#0D050F
muted
#7D797E

Preview Lab

Preview with #5A1978

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

Preview Lab → · Contrast checker → · Palette generator →

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