#5A218C#5A218C

#5A218C is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.3% C 0.166 H 303.7°. Best body text is #FFFFFF at 10.34:1 contrast (WCAG AA passes).

Color values

HEX#5A218C
RGBrgb(90, 33, 140)
HSLhsl(272, 62%, 34%)
HSVhsv(272, 76%, 55%)
CMYKcmyk(35.7%, 76.4%, 0%, 45.1%)
CIE-LABlab(27.17, 45.90, -48.52)
CIE-LCHlch(27.17, 66.79, 313.41°)
OKLaboklab(39.28% 0.0924 -0.1382)
OKLCHoklch(39.28% 0.166 303.7)
XYZxyz(9.4928, 5.1548, 25.3007)
Luminance0.0515 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A218C #538C21
analogous
#25218C #5A218C #8C2189
triadic
#5A218C #8C5A21 #218C5A
tetradic
#5A218C #8C2521 #538C21 #21898C
square
#5A218C #8C2521 #538C21 #21898C
split-complementary
#5A218C #898C21 #218C25
monochromatic
#1A0A29 #3A155A #5A218C #7A2DBE #9851D6

Accessibility & contrast

On white

10.34
#5A218C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.03
#5A218C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A218C
10.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A218C#FFFFFF#000000##FFFFFF
##5A218C1.0010.342.0310.34
#FFFFFF10.341.0021.001.00
#0000002.0321.001.0021.00
##FFFFFF10.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F8F
Deuteranopia (green-blind)
#00408A
Tritanopia (blue-blind)
#503C55
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #5a218c;
/* rgb */ color: rgb(90, 33, 140);
/* oklch */ color: oklch(39.3% 0.166 303.7);
Tailwind
colors: {
  custom: {
    50: '#8e62ae',
    500: '#5a218c',
    950: '#000000',
  },
}
SCSS
$custom: #5a218c;
$custom-light: #8e62ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5a218c",
  "rgb": {
    "r": 90,
    "g": 33,
    "b": 140
  },
  "hsl": {
    "h": 271.963,
    "s": 61.85,
    "l": 33.922
  },
  "oklch": {
    "l": 0.3928,
    "c": 0.16625,
    "h": 303.7
  },
  "luminance": 0.05155
}

Semantic roles & 50–950 ramp

primary
#5A218C
secondary
#81B94F
accent
#E5438F
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0510
muted
#7E7A7F

Preview Lab

Preview with #5A218C

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

Preview Lab → · Contrast checker → · Palette generator →

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