#5A1257#5A1257

#5A1257 is a dark, vivid purple. Relative luminance 0.033; OKLCH L 33.8% C 0.132 H 329.9°. Best body text is #FFFFFF at 12.66:1 contrast (WCAG AA passes).

Color values

HEX#5A1257
RGBrgb(90, 18, 87)
HSLhsl(303, 67%, 21%)
HSVhsv(303, 80%, 35%)
CMYKcmyk(0%, 80%, 3.3%, 64.7%)
CIE-LABlab(21.19, 40.47, -24.05)
CIE-LCHlch(21.19, 47.07, 329.28°)
OKLaboklab(33.81% 0.1145 -0.0664)
OKLCHoklch(33.81% 0.132 329.9)
XYZxyz(6.1530, 3.2949, 9.3269)
Luminance0.0329 (WCAG relative)
Temperatureneutral
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A1257 #125A15
analogous
#39125A #5A1257 #5A1233
triadic
#5A1257 #575A12 #12575A
tetradic
#5A1257 #5A3912 #125A15 #12335A
square
#5A1257 #5A3912 #125A15 #12335A
split-complementary
#5A1257 #335A12 #125A39
monochromatic
#1A0519 #270826 #5A1257 #8D1C88 #C026BA

Accessibility & contrast

On white

12.66
#5A1257 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#5A1257 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A1257
12.66:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A1257#FFFFFF#000000##FFFFFF
##5A12571.0012.661.6612.66
#FFFFFF12.661.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.661.0021.001.00

Color blindness preview

Protanopia (red-blind)
#082D59
Deuteranopia (green-blind)
#283655
Tritanopia (blue-blind)
#5E1C33
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #5a1257;
/* rgb */ color: rgb(90, 18, 87);
/* oklch */ color: oklch(33.8% 0.132 329.9);
Tailwind
colors: {
  custom: {
    50: '#8c5987',
    500: '#5a1257',
    950: '#000000',
  },
}
SCSS
$custom: #5a1257;
$custom-light: #8c5987;
$custom-dark: #000000;
JSON
{
  "hex": "#5a1257",
  "rgb": {
    "r": 90,
    "g": 18,
    "b": 87
  },
  "hsl": {
    "h": 302.5,
    "s": 66.667,
    "l": 21.176
  },
  "oklch": {
    "l": 0.33809,
    "c": 0.13235,
    "h": 329.9
  },
  "luminance": 0.03294
}

Semantic roles & 50–950 ramp

primary
#5A1257
secondary
#359339
accent
#EA453E
background
#F8F5F8
surface
#F0E9EF
border
#CBC5CA
text
#0C040B
muted
#7D797C

Preview Lab

Preview with #5A1257

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

Preview Lab → · Contrast checker → · Palette generator →

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