#5A127C#5A127C

#5A127C is a dark, vivid purple. Relative luminance 0.041; OKLCH L 36.6% C 0.166 H 311.3°. Best body text is #FFFFFF at 11.59:1 contrast (WCAG AA passes).

Color values

HEX#5A127C
RGBrgb(90, 18, 124)
HSLhsl(281, 75%, 28%)
HSVhsv(281, 85%, 49%)
CMYKcmyk(27.4%, 85.5%, 0%, 51.4%)
CIE-LABlab(23.87, 47.89, -43.84)
CIE-LCHlch(23.87, 64.92, 317.53°)
OKLaboklab(36.56% 0.1093 -0.1244)
OKLCHoklch(36.56% 0.166 311.3)
XYZxyz(8.0701, 4.0617, 19.4237)
Luminance0.0406 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A127C #347C12
analogous
#25127C #5A127C #7C1269
triadic
#5A127C #7C5A12 #127C5A
tetradic
#5A127C #7C2512 #347C12 #12697C
square
#5A127C #7C2512 #347C12 #12697C
split-complementary
#5A127C #697C12 #127C25
monochromatic
#13041B #330A47 #5A127C #811AB1 #A529E0

Accessibility & contrast

On white

11.59
#5A127C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.81
#5A127C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A127C
11.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A127C#FFFFFF#000000##FFFFFF
##5A127C1.0011.591.8111.59
#FFFFFF11.591.0021.001.00
#0000001.8121.001.0021.00
##FFFFFF11.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00367F
Deuteranopia (green-blind)
#003A7A
Tritanopia (blue-blind)
#552E49
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #5a127c;
/* rgb */ color: rgb(90, 18, 124);
/* oklch */ color: oklch(36.6% 0.166 311.3);
Tailwind
colors: {
  custom: {
    50: '#8d5ba3',
    500: '#5a127c',
    950: '#000000',
  },
}
SCSS
$custom: #5a127c;
$custom-light: #8d5ba3;
$custom-dark: #000000;
JSON
{
  "hex": "#5a127c",
  "rgb": {
    "r": 90,
    "g": 18,
    "b": 124
  },
  "hsl": {
    "h": 280.755,
    "s": 74.648,
    "l": 27.843
  },
  "oklch": {
    "l": 0.36557,
    "c": 0.16554,
    "h": 311.3
  },
  "luminance": 0.04062
}

Semantic roles & 50–950 ramp

primary
#5A127C
secondary
#5FB238
accent
#F13772
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D040F
muted
#7E797F

Preview Lab

Preview with #5A127C

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

Preview Lab → · Contrast checker → · Palette generator →

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