#5A127E#5A127E

#5A127E is a dark, vivid purple. Relative luminance 0.041; OKLCH L 36.7% C 0.167 H 310.5°. Best body text is #FFFFFF at 11.52:1 contrast (WCAG AA passes).

Color values

HEX#5A127E
RGBrgb(90, 18, 126)
HSLhsl(280, 75%, 28%)
HSVhsv(280, 86%, 49%)
CMYKcmyk(28.6%, 85.7%, 0%, 50.6%)
CIE-LABlab(24.04, 48.32, -44.84)
CIE-LCHlch(24.04, 65.92, 317.14°)
OKLaboklab(36.73% 0.1087 -0.1273)
OKLCHoklch(36.73% 0.167 310.5)
XYZxyz(8.1979, 4.1128, 20.0966)
Luminance0.0411 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A127E #367E12
analogous
#24127E #5A127E #7E126C
triadic
#5A127E #7E5A12 #127E5A
tetradic
#5A127E #7E2412 #367E12 #126C7E
square
#5A127E #7E2412 #367E12 #126C7E
split-complementary
#5A127E #6C7E12 #127E24
monochromatic
#13041B #340A48 #5A127E #801AB4 #A42AE1

Accessibility & contrast

On white

11.52
#5A127E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.82
#5A127E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A127E
11.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A127E#FFFFFF#000000##FFFFFF
##5A127E1.0011.521.8211.52
#FFFFFF11.521.0021.001.00
#0000001.8221.001.0021.00
##FFFFFF11.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003681
Deuteranopia (green-blind)
#003A7C
Tritanopia (blue-blind)
#552F4A
Achromatopsia (no color)
#393939

Design tokens & code

CSS
--color: #5a127e;
/* rgb */ color: rgb(90, 18, 126);
/* oklch */ color: oklch(36.7% 0.167 310.5);
Tailwind
colors: {
  custom: {
    50: '#8d5ba4',
    500: '#5a127e',
    950: '#000000',
  },
}
SCSS
$custom: #5a127e;
$custom-light: #8d5ba4;
$custom-dark: #000000;
JSON
{
  "hex": "#5a127e",
  "rgb": {
    "r": 90,
    "g": 18,
    "b": 126
  },
  "hsl": {
    "h": 280,
    "s": 75,
    "l": 28.235
  },
  "oklch": {
    "l": 0.36725,
    "c": 0.16739,
    "h": 310.5
  },
  "luminance": 0.04113
}

Semantic roles & 50–950 ramp

primary
#5A127E
secondary
#61B438
accent
#F23675
background
#F9F5FA
surface
#F1E9F4
border
#CBC5CE
text
#0D040F
muted
#7E797F

Preview Lab

Preview with #5A127E

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

Preview Lab → · Contrast checker → · Palette generator →

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