#5A2187#5A2187

#5A2187 is a dark, vivid violet. Relative luminance 0.050; OKLCH L 38.9% C 0.161 H 305.5°. Best body text is #FFFFFF at 10.49:1 contrast (WCAG AA passes).

Color values

HEX#5A2187
RGBrgb(90, 33, 135)
HSLhsl(274, 61%, 33%)
HSVhsv(274, 76%, 53%)
CMYKcmyk(33.3%, 75.6%, 0%, 47.1%)
CIE-LABlab(26.77, 44.68, -46.07)
CIE-LCHlch(26.77, 64.17, 314.12°)
OKLaboklab(38.87% 0.0934 -0.131)
OKLCHoklch(38.87% 0.161 305.5)
XYZxyz(9.1325, 5.0107, 23.4030)
Luminance0.0501 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2187 #4E8721
analogous
#272187 #5A2187 #872181
triadic
#5A2187 #875A21 #21875A
tetradic
#5A2187 #872721 #4E8721 #218187
square
#5A2187 #872721 #4E8721 #218187
split-complementary
#5A2187 #818721 #218727
monochromatic
#180925 #391556 #5A2187 #7B2DB8 #994FD4

Accessibility & contrast

On white

10.49
#5A2187 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.00
#5A2187 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2187
10.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2187#FFFFFF#000000##FFFFFF
##5A21871.0010.492.0010.49
#FFFFFF10.491.0021.001.00
#0000002.0021.001.0021.00
##FFFFFF10.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003E8A
Deuteranopia (green-blind)
#003F85
Tritanopia (blue-blind)
#523A52
Achromatopsia (no color)
#3F3F3F

Design tokens & code

CSS
--color: #5a2187;
/* rgb */ color: rgb(90, 33, 135);
/* oklch */ color: oklch(38.9% 0.161 305.5);
Tailwind
colors: {
  custom: {
    50: '#8d62ab',
    500: '#5a2187',
    950: '#000000',
  },
}
SCSS
$custom: #5a2187;
$custom-light: #8d62ab;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2187",
  "rgb": {
    "r": 90,
    "g": 33,
    "b": 135
  },
  "hsl": {
    "h": 273.529,
    "s": 60.714,
    "l": 32.941
  },
  "oklch": {
    "l": 0.38867,
    "c": 0.16092,
    "h": 305.5
  },
  "luminance": 0.05011
}

Semantic roles & 50–950 ramp

primary
#5A2187
secondary
#7CB74D
accent
#E4448A
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0510
muted
#7E7A7F

Preview Lab

Preview with #5A2187

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

Preview Lab → · Contrast checker → · Palette generator →

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