#5A1271#5A1271

#5A1271 is a dark, vivid purple. Relative luminance 0.038; OKLCH L 35.7% C 0.155 H 316.0°. Best body text is #FFFFFF at 11.93:1 contrast (WCAG AA passes).

Color values

HEX#5A1271
RGBrgb(90, 18, 113)
HSLhsl(285, 73%, 26%)
HSVhsv(285, 84%, 44%)
CMYKcmyk(20.4%, 84.1%, 0%, 55.7%)
CIE-LABlab(22.99, 45.54, -38.22)
CIE-LCHlch(22.99, 59.46, 319.99°)
OKLaboklab(35.67% 0.1119 -0.1079)
OKLCHoklch(35.67% 0.155 316)
XYZxyz(7.4129, 3.7988, 15.9624)
Luminance0.0380 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1271 #297112
analogous
#2B1271 #5A1271 #711258
triadic
#5A1271 #715A12 #12715A
tetradic
#5A1271 #712B12 #297112 #125871
square
#5A1271 #712B12 #297112 #125871
split-complementary
#5A1271 #587112 #12712B
monochromatic
#15041A #300A3C #5A1271 #841AA6 #AE23DB

Accessibility & contrast

On white

11.93
#5A1271 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#5A1271 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1271
11.93:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1271#FFFFFF#000000##FFFFFF
##5A12711.0011.931.7611.93
#FFFFFF11.931.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.931.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003373
Deuteranopia (green-blind)
#10396F
Tritanopia (blue-blind)
#582942
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #5a1271;
/* rgb */ color: rgb(90, 18, 113);
/* oklch */ color: oklch(35.7% 0.155 316.0);
Tailwind
colors: {
  custom: {
    50: '#8c5a9a',
    500: '#5a1271',
    950: '#000000',
  },
}
SCSS
$custom: #5a1271;
$custom-light: #8c5a9a;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1271",
  "rgb": {
    "r": 90,
    "g": 18,
    "b": 113
  },
  "hsl": {
    "h": 285.474,
    "s": 72.519,
    "l": 25.686
  },
  "oklch": {
    "l": 0.35666,
    "c": 0.15539,
    "h": 316
  },
  "luminance": 0.03799
}

Semantic roles & 50–950 ramp

primary
#5A1271
secondary
#52A837
accent
#EF3965
background
#F8F5F9
surface
#F0E9F2
border
#CBC5CC
text
#0D040E
muted
#7D797E

Preview Lab

Preview with #5A1271

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

Preview Lab → · Contrast checker → · Palette generator →

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