#5A1789#5A1789

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

Color values

HEX#5A1789
RGBrgb(90, 23, 137)
HSLhsl(275, 71%, 31%)
HSVhsv(275, 83%, 54%)
CMYKcmyk(34.3%, 83.2%, 0%, 46.3%)
CIE-LABlab(25.54, 49.15, -49.31)
CIE-LCHlch(25.54, 69.62, 314.91°)
OKLaboklab(38.06% 0.1018 -0.1405)
OKLCHoklch(38.06% 0.174 305.9)
XYZxyz(9.0372, 4.5927, 24.0724)
Luminance0.0459 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1789 #468917
analogous
#211789 #5A1789 #89177F
triadic
#5A1789 #895A17 #17895A
tetradic
#5A1789 #892117 #468917 #177F89
square
#5A1789 #892117 #468917 #177F89
split-complementary
#5A1789 #7F8917 #178921
monochromatic
#150520 #380E55 #5A1789 #7C20BD #9B3CDE

Accessibility & contrast

On white

10.95
#5A1789 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.92
#5A1789 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1789
10.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1789#FFFFFF#000000##FFFFFF
##5A17891.0010.951.9210.95
#FFFFFF10.951.0021.001.00
#0000001.9221.001.0021.00
##FFFFFF10.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B8C
Deuteranopia (green-blind)
#003D87
Tritanopia (blue-blind)
#513651
Achromatopsia (no color)
#3D3D3D

Design tokens & code

CSS
--color: #5a1789;
/* rgb */ color: rgb(90, 23, 137);
/* oklch */ color: oklch(38.1% 0.173 305.9);
Tailwind
colors: {
  custom: {
    50: '#8e5eac',
    500: '#5a1789',
    950: '#000000',
  },
}
SCSS
$custom: #5a1789;
$custom-light: #8e5eac;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1789",
  "rgb": {
    "r": 90,
    "g": 23,
    "b": 137
  },
  "hsl": {
    "h": 275.263,
    "s": 71.25,
    "l": 31.373
  },
  "oklch": {
    "l": 0.3806,
    "c": 0.1735,
    "h": 305.9
  },
  "luminance": 0.04593
}

Semantic roles & 50–950 ramp

primary
#5A1789
secondary
#73BD3F
accent
#EE3A84
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A1789

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

Preview Lab → · Contrast checker → · Palette generator →

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