#5A187B#5A187B

#5A187B is a dark, vivid purple. Relative luminance 0.043; OKLCH L 37.0% C 0.159 H 311.2°. Best body text is #FFFFFF at 11.34:1 contrast (WCAG AA passes).

Color values

HEX#5A187B
RGBrgb(90, 24, 123)
HSLhsl(280, 67%, 29%)
HSVhsv(280, 80%, 48%)
CMYKcmyk(26.8%, 80.5%, 0%, 51.8%)
CIE-LABlab(24.50, 45.60, -42.18)
CIE-LCHlch(24.50, 62.12, 317.23°)
OKLaboklab(36.97% 0.1046 -0.1195)
OKLCHoklch(36.97% 0.159 311.2)
XYZxyz(8.1176, 4.2572, 19.1292)
Luminance0.0426 (WCAG relative)
Temperaturecool
Familypurple

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A187B #397B18
analogous
#29187B #5A187B #7B186B
triadic
#5A187B #7B5A18 #187B5A
tetradic
#5A187B #7B2918 #397B18 #186B7B
square
#5A187B #7B2918 #397B18 #186B7B
split-complementary
#5A187B #6B7B18 #187B29
monochromatic
#13051A #350E48 #5A187B #7F22AE #A236D8

Accessibility & contrast

On white

11.34
#5A187B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.85
#5A187B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A187B
11.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A187B#FFFFFF#000000##FFFFFF
##5A187B1.0011.341.8511.34
#FFFFFF11.341.0021.001.00
#0000001.8521.001.0021.00
##FFFFFF11.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00377E
Deuteranopia (green-blind)
#013B79
Tritanopia (blue-blind)
#563049
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #5a187b;
/* rgb */ color: rgb(90, 24, 123);
/* oklch */ color: oklch(37.0% 0.159 311.2);
Tailwind
colors: {
  custom: {
    50: '#8d5da2',
    500: '#5a187b',
    950: '#000000',
  },
}
SCSS
$custom: #5a187b;
$custom-light: #8d5da2;
$custom-dark: #000000;
JSON
{
  "hex": "#5a187b",
  "rgb": {
    "r": 90,
    "g": 24,
    "b": 123
  },
  "hsl": {
    "h": 280,
    "s": 67.347,
    "l": 28.824
  },
  "oklch": {
    "l": 0.36972,
    "c": 0.15882,
    "h": 311.2
  },
  "luminance": 0.04257
}

Semantic roles & 50–950 ramp

primary
#5A187B
secondary
#65B03F
accent
#EA3E77
background
#F8F5FA
surface
#F0E9F3
border
#CBC5CD
text
#0D050F
muted
#7D797F

Preview Lab

Preview with #5A187B

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

Preview Lab → · Contrast checker → · Palette generator →

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