#5A2172#5A2172

#5A2172 is a dark, vivid purple. Relative luminance 0.045; OKLCH L 37.2% C 0.139 H 314.1°. Best body text is #FFFFFF at 11.08:1 contrast (WCAG AA passes).

Color values

HEX#5A2172
RGBrgb(90, 33, 114)
HSLhsl(282, 55%, 29%)
HSVhsv(282, 71%, 45%)
CMYKcmyk(21.1%, 71.1%, 0%, 55.3%)
CIE-LABlab(25.19, 39.72, -35.33)
CIE-LCHlch(25.19, 53.16, 318.35°)
OKLaboklab(37.24% 0.0965 -0.0995)
OKLCHoklch(37.24% 0.139 314.1)
XYZxyz(7.7971, 4.4765, 16.3697)
Luminance0.0448 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2172 #397221
analogous
#322172 #5A2172 #722162
triadic
#5A2172 #725A21 #21725A
tetradic
#5A2172 #723221 #397221 #216272
square
#5A2172 #723221 #397221 #216272
split-complementary
#5A2172 #627221 #217232
monochromatic
#130718 #351343 #5A2172 #7F2FA1 #A244C9

Accessibility & contrast

On white

11.08
#5A2172 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.90
#5A2172 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2172
11.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2172#FFFFFF#000000##FFFFFF
##5A21721.0011.081.9011.08
#FFFFFF11.081.0021.001.00
#0000001.9021.001.0021.00
##FFFFFF11.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003974
Deuteranopia (green-blind)
#1D3D70
Tritanopia (blue-blind)
#583147
Achromatopsia (no color)
#3C3C3C

Design tokens & code

CSS
--color: #5a2172;
/* rgb */ color: rgb(90, 33, 114);
/* oklch */ color: oklch(37.2% 0.139 314.1);
Tailwind
colors: {
  custom: {
    50: '#8c619b',
    500: '#5a2172',
    950: '#000000',
  },
}
SCSS
$custom: #5a2172;
$custom-light: #8c619b;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2172",
  "rgb": {
    "r": 90,
    "g": 33,
    "b": 114
  },
  "hsl": {
    "h": 282.222,
    "s": 55.102,
    "l": 28.824
  },
  "oklch": {
    "l": 0.37245,
    "c": 0.13857,
    "h": 314.1
  },
  "luminance": 0.04476
}

Semantic roles & 50–950 ramp

primary
#5A2172
secondary
#65A549
accent
#DE4976
background
#F8F5F9
surface
#F0EAF2
border
#CBC6CC
text
#0C050E
muted
#7D797E

Preview Lab

Preview with #5A2172

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

Preview Lab → · Contrast checker → · Palette generator →

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