#5A1788#5A1788

#5A1788 is a dark, vivid violet. Relative luminance 0.046; OKLCH L 38.0% C 0.173 H 306.3°. Best body text is #FFFFFF at 10.98:1 contrast (WCAG AA passes).

Color values

HEX#5A1788
RGBrgb(90, 23, 136)
HSLhsl(276, 71%, 31%)
HSVhsv(276, 83%, 53%)
CMYKcmyk(33.8%, 83.1%, 0%, 46.7%)
CIE-LABlab(25.45, 48.92, -48.83)
CIE-LCHlch(25.45, 69.12, 315.06°)
OKLaboklab(37.97% 0.1021 -0.1391)
OKLCHoklch(37.97% 0.173 306.3)
XYZxyz(8.9658, 4.5641, 23.6964)
Luminance0.0456 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1788 #458817
analogous
#211788 #5A1788 #88177D
triadic
#5A1788 #885A17 #17885A
tetradic
#5A1788 #882117 #458817 #177D88
square
#5A1788 #882117 #458817 #177D88
split-complementary
#5A1788 #7D8817 #178821
monochromatic
#15051F #370E54 #5A1788 #7D20BC #9C3BDE

Accessibility & contrast

On white

10.98
#5A1788 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.91
#5A1788 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1788
10.98:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1788#FFFFFF#000000##FFFFFF
##5A17881.0010.981.9110.98
#FFFFFF10.981.0021.001.00
#0000001.9121.001.0021.00
##FFFFFF10.981.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A8B
Deuteranopia (green-blind)
#003D86
Tritanopia (blue-blind)
#523650
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #5a1788;
/* rgb */ color: rgb(90, 23, 136);
/* oklch */ color: oklch(38.0% 0.173 306.3);
Tailwind
colors: {
  custom: {
    50: '#8e5eac',
    500: '#5a1788',
    950: '#000000',
  },
}
SCSS
$custom: #5a1788;
$custom-light: #8e5eac;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1788",
  "rgb": {
    "r": 90,
    "g": 23,
    "b": 136
  },
  "hsl": {
    "h": 275.575,
    "s": 71.069,
    "l": 31.176
  },
  "oklch": {
    "l": 0.37973,
    "c": 0.17252,
    "h": 306.3
  },
  "luminance": 0.04564
}

Semantic roles & 50–950 ramp

primary
#5A1788
secondary
#72BC3F
accent
#EE3A83
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A1788

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

Preview Lab → · Contrast checker → · Palette generator →

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