#5A157D#5A157D

#5A157D is a dark, vivid violet. Relative luminance 0.042; OKLCH L 36.9% C 0.164 H 310.6°. Best body text is #FFFFFF at 11.42:1 contrast (WCAG AA passes).

Color values

HEX#5A157D
RGBrgb(90, 21, 125)
HSLhsl(280, 71%, 29%)
HSVhsv(280, 83%, 49%)
CMYKcmyk(28%, 83.2%, 0%, 51%)
CIE-LABlab(24.29, 47.13, -43.79)
CIE-LCHlch(24.29, 64.33, 317.10°)
OKLaboklab(36.88% 0.1067 -0.1242)
OKLCHoklch(36.88% 0.164 310.6)
XYZxyz(8.1856, 4.1909, 19.7758)
Luminance0.0419 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A157D #387D15
analogous
#26157D #5A157D #7D156C
triadic
#5A157D #7D5A15 #157D5A
tetradic
#5A157D #7D2615 #387D15 #156C7D
square
#5A157D #7D2615 #387D15 #156C7D
split-complementary
#5A157D #6C7D15 #157D26
monochromatic
#13041A #340C49 #5A157D #801EB1 #A230DC

Accessibility & contrast

On white

11.42
#5A157D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.84
#5A157D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A157D
11.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A157D#FFFFFF#000000##FFFFFF
##5A157D1.0011.421.8411.42
#FFFFFF11.421.0021.001.00
#0000001.8421.001.0021.00
##FFFFFF11.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003780
Deuteranopia (green-blind)
#003B7B
Tritanopia (blue-blind)
#55304A
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #5a157d;
/* rgb */ color: rgb(90, 21, 125);
/* oklch */ color: oklch(36.9% 0.164 310.6);
Tailwind
colors: {
  custom: {
    50: '#8d5ca3',
    500: '#5a157d',
    950: '#000000',
  },
}
SCSS
$custom: #5a157d;
$custom-light: #8d5ca3;
$custom-dark: #000000;
JSON
{
  "hex": "#5a157d",
  "rgb": {
    "r": 90,
    "g": 21,
    "b": 125
  },
  "hsl": {
    "h": 279.808,
    "s": 71.233,
    "l": 28.627
  },
  "oklch": {
    "l": 0.36875,
    "c": 0.16376,
    "h": 310.6
  },
  "luminance": 0.04191
}

Semantic roles & 50–950 ramp

primary
#5A157D
secondary
#64B23C
accent
#EE3A76
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D040F
muted
#7E797F

Preview Lab

Preview with #5A157D

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

Preview Lab → · Contrast checker → · Palette generator →

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