#5A1796#5A1796

#5A1796 is a dark, vivid violet. Relative luminance 0.050; OKLCH L 39.2% C 0.186 H 301.6°. Best body text is #FFFFFF at 10.51:1 contrast (WCAG AA passes).

Color values

HEX#5A1796
RGBrgb(90, 23, 150)
HSLhsl(272, 73%, 34%)
HSVhsv(272, 85%, 59%)
CMYKcmyk(40%, 84.7%, 0%, 41.2%)
CIE-LABlab(26.70, 52.19, -55.47)
CIE-LCHlch(26.70, 76.17, 313.25°)
OKLaboklab(39.22% 0.0977 -0.1586)
OKLCHoklch(39.22% 0.186 301.6)
XYZxyz(10.0265, 4.9884, 29.2829)
Luminance0.0499 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1796 #539617
analogous
#1B1796 #5A1796 #961793
triadic
#5A1796 #965A17 #17965A
tetradic
#5A1796 #961B17 #539617 #179396
square
#5A1796 #961B17 #539617 #179396
split-complementary
#5A1796 #939617 #17961B
monochromatic
#1A072C #3A0F61 #5A1796 #7A1FCB #9845E2

Accessibility & contrast

On white

10.51
#5A1796 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#5A1796 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1796
10.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1796#FFFFFF#000000##FFFFFF
##5A17961.0010.512.0010.51
#FFFFFF10.511.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E99
Deuteranopia (green-blind)
#003E94
Tritanopia (blue-blind)
#4C3C59
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #5a1796;
/* rgb */ color: rgb(90, 23, 150);
/* oklch */ color: oklch(39.2% 0.186 301.6);
Tailwind
colors: {
  custom: {
    50: '#8f5fb6',
    500: '#5a1796',
    950: '#000000',
  },
}
SCSS
$custom: #5a1796;
$custom-light: #8f5fb6;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1796",
  "rgb": {
    "r": 90,
    "g": 23,
    "b": 150
  },
  "hsl": {
    "h": 271.654,
    "s": 73.41,
    "l": 33.922
  },
  "oklch": {
    "l": 0.39222,
    "c": 0.18623,
    "h": 301.6
  },
  "luminance": 0.04988
}

Semantic roles & 50–950 ramp

primary
#5A1796
secondary
#81C345
accent
#F0388F
background
#F9F5FB
surface
#F2EAF6
border
#CCC6D0
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5A1796

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

Preview Lab → · Contrast checker → · Palette generator →

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