#5A1D97#5A1D97

#5A1D97 is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.8% C 0.182 H 300.7°. Best body text is #FFFFFF at 10.21:1 contrast (WCAG AA passes).

Color values

HEX#5A1D97
RGBrgb(90, 29, 151)
HSLhsl(270, 68%, 35%)
HSVhsv(270, 81%, 59%)
CMYKcmyk(40.4%, 80.8%, 0%, 40.8%)
CIE-LABlab(27.54, 50.26, -54.72)
CIE-LCHlch(27.54, 74.30, 312.57°)
OKLaboklab(39.83% 0.0929 -0.1564)
OKLCHoklch(39.83% 0.182 300.7)
XYZxyz(10.2403, 5.2867, 29.7531)
Luminance0.0529 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1D97 #5A971D
analogous
#1D1D97 #5A1D97 #971D97
triadic
#5A1D97 #975A1D #1D975A
tetradic
#5A1D97 #971D1D #5A971D #1D9797
square
#5A1D97 #971D1D #5A971D #1D9797
split-complementary
#5A1D97 #97971D #1D971D
monochromatic
#1D0930 #3B1364 #5A1D97 #7927CA #9751DE

Accessibility & contrast

On white

10.21
#5A1D97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#5A1D97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1D97
10.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1D97#FFFFFF#000000##FFFFFF
##5A1D971.0010.212.0610.21
#FFFFFF10.211.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00419A
Deuteranopia (green-blind)
#004095
Tritanopia (blue-blind)
#4C3F5A
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5a1d97;
/* rgb */ color: rgb(90, 29, 151);
/* oklch */ color: oklch(39.8% 0.182 300.7);
Tailwind
colors: {
  custom: {
    50: '#8f61b7',
    500: '#5a1d97',
    950: '#000000',
  },
}
SCSS
$custom: #5a1d97;
$custom-light: #8f61b7;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1d97",
  "rgb": {
    "r": 90,
    "g": 29,
    "b": 151
  },
  "hsl": {
    "h": 270,
    "s": 67.778,
    "l": 35.294
  },
  "oklch": {
    "l": 0.39829,
    "c": 0.18193,
    "h": 300.7
  },
  "luminance": 0.05287
}

Semantic roles & 50–950 ramp

primary
#5A1D97
secondary
#88C04F
accent
#EB3D94
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0511
muted
#7E7A80

Preview Lab

Preview with #5A1D97

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

Preview Lab → · Contrast checker → · Palette generator →

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