#5A157C#5A157C

#5A157C is a dark, vivid purple. Relative luminance 0.042; OKLCH L 36.8% C 0.163 H 311.1°. Best body text is #FFFFFF at 11.46:1 contrast (WCAG AA passes).

Color values

HEX#5A157C
RGBrgb(90, 21, 124)
HSLhsl(280, 71%, 28%)
HSVhsv(280, 83%, 49%)
CMYKcmyk(27.4%, 83.1%, 0%, 51.4%)
CIE-LABlab(24.21, 46.91, -43.29)
CIE-LCHlch(24.21, 63.83, 317.30°)
OKLaboklab(36.79% 0.1069 -0.1228)
OKLCHoklch(36.79% 0.163 311.1)
XYZxyz(8.1220, 4.1654, 19.4410)
Luminance0.0416 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A157C #377C15
analogous
#26157C #5A157C #7C156A
triadic
#5A157C #7C5A15 #157C5A
tetradic
#5A157C #7C2615 #377C15 #156A7C
square
#5A157C #7C2615 #377C15 #156A7C
split-complementary
#5A157C #6A7C15 #157C26
monochromatic
#13041A #340C48 #5A157C #801EB0 #A330DC

Accessibility & contrast

On white

11.46
#5A157C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.83
#5A157C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A157C
11.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A157C#FFFFFF#000000##FFFFFF
##5A157C1.0011.461.8311.46
#FFFFFF11.461.0021.001.00
#0000001.8321.001.0021.00
##FFFFFF11.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00377F
Deuteranopia (green-blind)
#003B7A
Tritanopia (blue-blind)
#552F49
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #5a157c;
/* rgb */ color: rgb(90, 21, 124);
/* oklch */ color: oklch(36.8% 0.163 311.1);
Tailwind
colors: {
  custom: {
    50: '#8d5ca3',
    500: '#5a157c',
    950: '#000000',
  },
}
SCSS
$custom: #5a157c;
$custom-light: #8d5ca3;
$custom-dark: #000000;
JSON
{
  "hex": "#5a157c",
  "rgb": {
    "r": 90,
    "g": 21,
    "b": 124
  },
  "hsl": {
    "h": 280.194,
    "s": 71.034,
    "l": 28.431
  },
  "oklch": {
    "l": 0.36792,
    "c": 0.16281,
    "h": 311.1
  },
  "luminance": 0.04165
}

Semantic roles & 50–950 ramp

primary
#5A157C
secondary
#62B13C
accent
#EE3A75
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D040F
muted
#7E797F

Preview Lab

Preview with #5A157C

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

Preview Lab → · Contrast checker → · Palette generator →

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