#5A1252#5A1252

#5A1252 is a dark, vivid purple. Relative luminance 0.032; OKLCH L 33.5% C 0.128 H 333.1°. Best body text is #FFFFFF at 12.78:1 contrast (WCAG AA passes).

Color values

HEX#5A1252
RGBrgb(90, 18, 82)
HSLhsl(307, 67%, 21%)
HSVhsv(307, 80%, 35%)
CMYKcmyk(0%, 80%, 8.9%, 64.7%)
CIE-LABlab(20.89, 39.59, -21.16)
CIE-LCHlch(20.89, 44.89, 331.88°)
OKLaboklab(33.5% 0.1143 -0.0581)
OKLCHoklch(33.5% 0.128 333.1)
XYZxyz(5.9558, 3.2160, 8.2881)
Luminance0.0321 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1252 #125A1A
analogous
#3E125A #5A1252 #5A122E
triadic
#5A1252 #525A12 #12525A
tetradic
#5A1252 #5A3E12 #125A1A #122E5A
square
#5A1252 #5A3E12 #125A1A #122E5A
split-complementary
#5A1252 #2E5A12 #125A3E
monochromatic
#1A0517 #270824 #5A1252 #8D1C80 #C026AF

Accessibility & contrast

On white

12.78
#5A1252 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#5A1252 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1252
12.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1252#FFFFFF#000000##FFFFFF
##5A12521.0012.781.6412.78
#FFFFFF12.781.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0F2C54
Deuteranopia (green-blind)
#2A3650
Tritanopia (blue-blind)
#5E1A31
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #5a1252;
/* rgb */ color: rgb(90, 18, 82);
/* oklch */ color: oklch(33.5% 0.128 333.1);
Tailwind
colors: {
  custom: {
    50: '#8b5983',
    500: '#5a1252',
    950: '#000000',
  },
}
SCSS
$custom: #5a1252;
$custom-light: #8b5983;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1252",
  "rgb": {
    "r": 90,
    "g": 18,
    "b": 82
  },
  "hsl": {
    "h": 306.667,
    "s": 66.667,
    "l": 21.176
  },
  "oklch": {
    "l": 0.33498,
    "c": 0.1282,
    "h": 333.1
  },
  "luminance": 0.03215
}

Semantic roles & 50–950 ramp

primary
#5A1252
secondary
#359340
accent
#EA513E
background
#F8F5F8
surface
#F0E9EF
border
#CBC5CA
text
#0C040A
muted
#7D797C

Preview Lab

Preview with #5A1252

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

Preview Lab → · Contrast checker → · Palette generator →

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