#5A1B97#5A1B97

#5A1B97 is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.6% C 0.184 H 300.9°. Best body text is #FFFFFF at 10.30:1 contrast (WCAG AA passes).

Color values

HEX#5A1B97
RGBrgb(90, 27, 151)
HSLhsl(270, 70%, 35%)
HSVhsv(270, 82%, 59%)
CMYKcmyk(40.4%, 82.1%, 0%, 40.8%)
CIE-LABlab(27.27, 51.02, -55.15)
CIE-LCHlch(27.27, 75.13, 312.77°)
OKLaboklab(39.65% 0.0945 -0.1577)
OKLCHoklch(39.65% 0.184 300.9)
XYZxyz(10.1929, 5.1918, 29.7373)
Luminance0.0519 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1B97 #58971B
analogous
#1C1B97 #5A1B97 #971B96
triadic
#5A1B97 #975A1B #1B975A
tetradic
#5A1B97 #971C1B #58971B #1B9697
square
#5A1B97 #971C1B #58971B #1B9697
split-complementary
#5A1B97 #96971B #1B971C
monochromatic
#1C082F #3B1263 #5A1B97 #7924CB #974DDF

Accessibility & contrast

On white

10.30
#5A1B97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#5A1B97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1B97
10.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1B97#FFFFFF#000000##FFFFFF
##5A1B971.0010.302.0410.30
#FFFFFF10.301.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00409A
Deuteranopia (green-blind)
#004095
Tritanopia (blue-blind)
#4C3E5A
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #5a1b97;
/* rgb */ color: rgb(90, 27, 151);
/* oklch */ color: oklch(39.6% 0.184 300.9);
Tailwind
colors: {
  custom: {
    50: '#8f60b7',
    500: '#5a1b97',
    950: '#000000',
  },
}
SCSS
$custom: #5a1b97;
$custom-light: #8f60b7;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1b97",
  "rgb": {
    "r": 90,
    "g": 27,
    "b": 151
  },
  "hsl": {
    "h": 270.484,
    "s": 69.663,
    "l": 34.902
  },
  "oklch": {
    "l": 0.39646,
    "c": 0.1838,
    "h": 300.9
  },
  "luminance": 0.05192
}

Semantic roles & 50–950 ramp

primary
#5A1B97
secondary
#86C14C
accent
#EC3B92
background
#F9F5FB
surface
#F1EAF6
border
#CBC6D0
text
#0D0511
muted
#7E7980

Preview Lab

Preview with #5A1B97

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

Preview Lab → · Contrast checker → · Palette generator →

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