#5A157F#5A157F

#5A157F is a dark, vivid violet. Relative luminance 0.042; OKLCH L 37.0% C 0.166 H 309.9°. Best body text is #FFFFFF at 11.36:1 contrast (WCAG AA passes).

Color values

HEX#5A157F
RGBrgb(90, 21, 127)
HSLhsl(279, 72%, 29%)
HSVhsv(279, 83%, 50%)
CMYKcmyk(29.1%, 83.5%, 0%, 50.2%)
CIE-LABlab(24.46, 47.57, -44.79)
CIE-LCHlch(24.46, 65.34, 316.72°)
OKLaboklab(37.04% 0.1062 -0.1272)
OKLCHoklch(37.04% 0.166 309.9)
XYZxyz(8.3146, 4.2425, 20.4554)
Luminance0.0424 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A157F #3A7F15
analogous
#25157F #5A157F #7F156F
triadic
#5A157F #7F5A15 #157F5A
tetradic
#5A157F #7F2515 #3A7F15 #156F7F
square
#5A157F #7F2515 #3A7F15 #156F7F
split-complementary
#5A157F #6F7F15 #157F25
monochromatic
#13041A #350C4A #5A157F #7F1EB4 #A131DD

Accessibility & contrast

On white

11.36
#5A157F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#5A157F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A157F
11.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A157F#FFFFFF#000000##FFFFFF
##5A157F1.0011.361.8511.36
#FFFFFF11.361.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003782
Deuteranopia (green-blind)
#003B7D
Tritanopia (blue-blind)
#55314B
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #5a157f;
/* rgb */ color: rgb(90, 21, 127);
/* oklch */ color: oklch(37.0% 0.166 309.9);
Tailwind
colors: {
  custom: {
    50: '#8d5ca5',
    500: '#5a157f',
    950: '#000000',
  },
}
SCSS
$custom: #5a157f;
$custom-light: #8d5ca5;
$custom-dark: #000000;
JSON
{
  "hex": "#5a157f",
  "rgb": {
    "r": 90,
    "g": 21,
    "b": 127
  },
  "hsl": {
    "h": 279.057,
    "s": 71.622,
    "l": 29.02
  },
  "oklch": {
    "l": 0.37041,
    "c": 0.16567,
    "h": 309.9
  },
  "luminance": 0.04242
}

Semantic roles & 50–950 ramp

primary
#5A157F
secondary
#66B43C
accent
#EE3979
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D050F
muted
#7E797F

Preview Lab

Preview with #5A157F

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

Preview Lab → · Contrast checker → · Palette generator →

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