#5A1B8A#5A1B8A

#5A1B8A is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.5% C 0.171 H 305.2°. Best body text is #FFFFFF at 10.72:1 contrast (WCAG AA passes).

Color values

HEX#5A1B8A
RGBrgb(90, 27, 138)
HSLhsl(274, 67%, 32%)
HSVhsv(274, 80%, 54%)
CMYKcmyk(34.8%, 80.4%, 0%, 45.9%)
CIE-LABlab(26.14, 47.91, -48.97)
CIE-LCHlch(26.14, 68.51, 314.38°)
OKLaboklab(38.5% 0.0983 -0.1395)
OKLCHoklch(38.5% 0.171 305.2)
XYZxyz(9.1948, 4.7926, 24.4805)
Luminance0.0479 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1B8A #4B8A1B
analogous
#221B8A #5A1B8A #8A1B83
triadic
#5A1B8A #8A5A1B #1B8A5A
tetradic
#5A1B8A #8A221B #4B8A1B #1B838A
square
#5A1B8A #8A221B #4B8A1B #1B838A
split-complementary
#5A1B8A #838A1B #1B8A22
monochromatic
#170724 #391157 #5A1B8A #7B25BD #9A45DB

Accessibility & contrast

On white

10.72
#5A1B8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#5A1B8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1B8A
10.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1B8A#FFFFFF#000000##FFFFFF
##5A1B8A1.0010.721.9610.72
#FFFFFF10.721.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C8D
Deuteranopia (green-blind)
#003E88
Tritanopia (blue-blind)
#513852
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #5a1b8a;
/* rgb */ color: rgb(90, 27, 138);
/* oklch */ color: oklch(38.5% 0.171 305.2);
Tailwind
colors: {
  custom: {
    50: '#8e60ad',
    500: '#5a1b8a',
    950: '#000000',
  },
}
SCSS
$custom: #5a1b8a;
$custom-light: #8e60ad;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1b8a",
  "rgb": {
    "r": 90,
    "g": 27,
    "b": 138
  },
  "hsl": {
    "h": 274.054,
    "s": 67.273,
    "l": 32.353
  },
  "oklch": {
    "l": 0.38501,
    "c": 0.17065,
    "h": 305.2
  },
  "luminance": 0.04793
}

Semantic roles & 50–950 ramp

primary
#5A1B8A
secondary
#78BC45
accent
#EA3E88
background
#F9F5FA
surface
#F1EAF4
border
#CBC6CE
text
#0D0510
muted
#7E797F

Preview Lab

Preview with #5A1B8A

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

Preview Lab → · Contrast checker → · Palette generator →

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