#5A187C#5A187C

#5A187C is a dark, vivid violet. Relative luminance 0.043; OKLCH L 37.1% C 0.160 H 310.8°. Best body text is #FFFFFF at 11.31:1 contrast (WCAG AA passes).

Color values

HEX#5A187C
RGBrgb(90, 24, 124)
HSLhsl(280, 68%, 29%)
HSVhsv(280, 81%, 49%)
CMYKcmyk(27.4%, 80.6%, 0%, 51.4%)
CIE-LABlab(24.58, 45.83, -42.69)
CIE-LCHlch(24.58, 62.63, 317.03°)
OKLaboklab(37.05% 0.1044 -0.121)
OKLCHoklch(37.05% 0.16 310.8)
XYZxyz(8.1805, 4.2824, 19.4605)
Luminance0.0428 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A187C #3A7C18
analogous
#28187C #5A187C #7C186C
triadic
#5A187C #7C5A18 #187C5A
tetradic
#5A187C #7C2818 #3A7C18 #186C7C
square
#5A187C #7C2818 #3A7C18 #186C7C
split-complementary
#5A187C #6C7C18 #187C28
monochromatic
#13051A #350E49 #5A187C #7F22AF #A136D8

Accessibility & contrast

On white

11.31
#5A187C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.86
#5A187C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A187C
11.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A187C#FFFFFF#000000##FFFFFF
##5A187C1.0011.311.8611.31
#FFFFFF11.311.0021.001.00
#0000001.8621.001.0021.00
##FFFFFF11.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00387F
Deuteranopia (green-blind)
#003B7A
Tritanopia (blue-blind)
#55314A
Achromatopsia (no color)
#3A3A3A

Design tokens & code

CSS
--color: #5a187c;
/* rgb */ color: rgb(90, 24, 124);
/* oklch */ color: oklch(37.1% 0.160 310.8);
Tailwind
colors: {
  custom: {
    50: '#8d5da3',
    500: '#5a187c',
    950: '#000000',
  },
}
SCSS
$custom: #5a187c;
$custom-light: #8d5da3;
$custom-dark: #000000;
JSON
{
  "hex": "#5a187c",
  "rgb": {
    "r": 90,
    "g": 24,
    "b": 124
  },
  "hsl": {
    "h": 279.6,
    "s": 67.568,
    "l": 29.02
  },
  "oklch": {
    "l": 0.37053,
    "c": 0.1598,
    "h": 310.8
  },
  "luminance": 0.04282
}

Semantic roles & 50–950 ramp

primary
#5A187C
secondary
#66B13F
accent
#EA3D78
background
#F8F5FA
surface
#F0E9F4
border
#CBC5CE
text
#0D050F
muted
#7D797F

Preview Lab

Preview with #5A187C

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

Preview Lab → · Contrast checker → · Palette generator →

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