#5A1272#5A1272

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

Color values

HEX#5A1272
RGBrgb(90, 18, 114)
HSLhsl(285, 73%, 26%)
HSVhsv(285, 84%, 45%)
CMYKcmyk(21.1%, 84.2%, 0%, 55.3%)
CIE-LABlab(23.07, 45.75, -38.74)
CIE-LCHlch(23.07, 59.95, 319.74°)
OKLaboklab(35.74% 0.1116 -0.1094)
OKLCHoklch(35.74% 0.156 315.6)
XYZxyz(7.4695, 3.8215, 16.2605)
Luminance0.0382 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1272 #2A7212
analogous
#2A1272 #5A1272 #72125A
triadic
#5A1272 #725A12 #12725A
tetradic
#5A1272 #722A12 #2A7212 #125A72
square
#5A1272 #722A12 #2A7212 #125A72
split-complementary
#5A1272 #5A7212 #12722A
monochromatic
#15041A #300A3D #5A1272 #841AA7 #AD23DC

Accessibility & contrast

On white

11.90
#5A1272 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A1272
11.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1272#FFFFFF#000000##FFFFFF
##5A12721.0011.901.7611.90
#FFFFFF11.901.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003375
Deuteranopia (green-blind)
#0E3970
Tritanopia (blue-blind)
#582943
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #5a1272;
/* rgb */ color: rgb(90, 18, 114);
/* oklch */ color: oklch(35.7% 0.156 315.6);
Tailwind
colors: {
  custom: {
    50: '#8c5a9b',
    500: '#5a1272',
    950: '#000000',
  },
}
SCSS
$custom: #5a1272;
$custom-light: #8c5a9b;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1272",
  "rgb": {
    "r": 90,
    "g": 18,
    "b": 114
  },
  "hsl": {
    "h": 285,
    "s": 72.727,
    "l": 25.882
  },
  "oklch": {
    "l": 0.35745,
    "c": 0.1563,
    "h": 315.6
  },
  "luminance": 0.03821
}

Semantic roles & 50–950 ramp

primary
#5A1272
secondary
#53A937
accent
#EF3866
background
#F8F5F9
surface
#F0E9F2
border
#CBC5CC
text
#0D040E
muted
#7D797E

Preview Lab

Preview with #5A1272

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

Preview Lab → · Contrast checker → · Palette generator →

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