#5A1158#5A1158

#5A1158 is a dark, vivid purple. Relative luminance 0.033; OKLCH L 33.8% C 0.134 H 329.3°. Best body text is #FFFFFF at 12.68:1 contrast (WCAG AA passes).

Color values

HEX#5A1158
RGBrgb(90, 17, 88)
HSLhsl(302, 68%, 21%)
HSVhsv(302, 81%, 35%)
CMYKcmyk(0%, 81.1%, 2.2%, 64.7%)
CIE-LABlab(21.13, 40.99, -24.81)
CIE-LCHlch(21.13, 47.91, 328.82°)
OKLaboklab(33.79% 0.1155 -0.0686)
OKLCHoklch(33.79% 0.134 329.3)
XYZxyz(6.1783, 3.2796, 9.5383)
Luminance0.0328 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1158 #115A13
analogous
#37115A #5A1158 #5A1133
triadic
#5A1158 #585A11 #11585A
tetradic
#5A1158 #5A3711 #115A13 #11335A
square
#5A1158 #5A3711 #115A13 #11335A
split-complementary
#5A1158 #335A11 #115A37
monochromatic
#1A0519 #270726 #5A1158 #8D1B8A #C124BD

Accessibility & contrast

On white

12.68
#5A1158 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#5A1158 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1158
12.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1158#FFFFFF#000000##FFFFFF
##5A11581.0012.681.6612.68
#FFFFFF12.681.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#052D5A
Deuteranopia (green-blind)
#273656
Tritanopia (blue-blind)
#5D1C34
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #5a1158;
/* rgb */ color: rgb(90, 17, 88);
/* oklch */ color: oklch(33.8% 0.134 329.3);
Tailwind
colors: {
  custom: {
    50: '#8c5987',
    500: '#5a1158',
    950: '#000000',
  },
}
SCSS
$custom: #5a1158;
$custom-light: #8c5987;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1158",
  "rgb": {
    "r": 90,
    "g": 17,
    "b": 88
  },
  "hsl": {
    "h": 301.644,
    "s": 68.224,
    "l": 20.98
  },
  "oklch": {
    "l": 0.33788,
    "c": 0.13431,
    "h": 329.3
  },
  "luminance": 0.03279
}

Semantic roles & 50–950 ramp

primary
#5A1158
secondary
#349337
accent
#EB413D
background
#F8F5F8
surface
#F0E9EF
border
#CBC5CA
text
#0C040B
muted
#7D797C

Preview Lab

Preview with #5A1158

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

Preview Lab → · Contrast checker → · Palette generator →

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