#5A166D#5A166D

#5A166D is a dark, vivid purple. Relative luminance 0.039; OKLCH L 35.7% C 0.148 H 317.6°. Best body text is #FFFFFF at 11.86:1 contrast (WCAG AA passes).

Color values

HEX#5A166D
RGBrgb(90, 22, 109)
HSLhsl(287, 66%, 26%)
HSVhsv(287, 80%, 43%)
CMYKcmyk(17.4%, 79.8%, 0%, 57.3%)
CIE-LABlab(23.18, 43.32, -35.35)
CIE-LCHlch(23.18, 55.91, 320.79°)
OKLaboklab(35.7% 0.109 -0.0994)
OKLCHoklch(35.7% 0.148 317.6)
XYZxyz(7.2633, 3.8519, 14.8259)
Luminance0.0385 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A166D #296D16
analogous
#2F166D #5A166D #6D1654
triadic
#5A166D #6D5A16 #166D5A
tetradic
#5A166D #6D2F16 #296D16 #16546D
square
#5A166D #6D2F16 #296D16 #16546D
split-complementary
#5A166D #546D16 #166D2F
monochromatic
#150519 #300C3A #5A166D #8420A0 #AE2BD3

Accessibility & contrast

On white

11.86
#5A166D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.77
#5A166D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A166D
11.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A166D#FFFFFF#000000##FFFFFF
##5A166D1.0011.861.7711.86
#FFFFFF11.861.0021.001.00
#0000001.7721.001.0021.00
##FFFFFF11.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00336F
Deuteranopia (green-blind)
#19396B
Tritanopia (blue-blind)
#592941
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #5a166d;
/* rgb */ color: rgb(90, 22, 109);
/* oklch */ color: oklch(35.7% 0.148 317.6);
Tailwind
colors: {
  custom: {
    50: '#8c5c97',
    500: '#5a166d',
    950: '#000000',
  },
}
SCSS
$custom: #5a166d;
$custom-light: #8c5c97;
$custom-dark: #000000;
JSON
{
  "hex": "#5a166d",
  "rgb": {
    "r": 90,
    "g": 22,
    "b": 109
  },
  "hsl": {
    "h": 286.897,
    "s": 66.412,
    "l": 25.686
  },
  "oklch": {
    "l": 0.35698,
    "c": 0.14754,
    "h": 317.6
  },
  "luminance": 0.03852
}

Semantic roles & 50–950 ramp

primary
#5A166D
secondary
#52A33C
accent
#E93E64
background
#F8F5F9
surface
#F0E9F2
border
#CBC5CC
text
#0C040D
muted
#7D797E

Preview Lab

Preview with #5A166D

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

Preview Lab → · Contrast checker → · Palette generator →

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