#5A218D#5A218D

#5A218D is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.4% C 0.167 H 303.4°. Best body text is #FFFFFF at 10.31:1 contrast (WCAG AA passes).

Color values

HEX#5A218D
RGBrgb(90, 33, 141)
HSLhsl(272, 62%, 34%)
HSVhsv(272, 77%, 55%)
CMYKcmyk(36.2%, 76.6%, 0%, 44.7%)
CIE-LABlab(27.25, 46.14, -49.01)
CIE-LCHlch(27.25, 67.31, 313.28°)
OKLaboklab(39.36% 0.0921 -0.1397)
OKLCHoklch(39.36% 0.167 303.4)
XYZxyz(9.5669, 5.1845, 25.6908)
Luminance0.0518 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A218D #548D21
analogous
#24218D #5A218D #8D218A
triadic
#5A218D #8D5A21 #218D5A
tetradic
#5A218D #8D2421 #548D21 #218A8D
square
#5A218D #8D2421 #548D21 #218A8D
split-complementary
#5A218D #8A8D21 #218D24
monochromatic
#1B0A2A #3A155B #5A218D #7A2DBF #9852D6

Accessibility & contrast

On white

10.31
#5A218D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.04
#5A218D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A218D
10.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A218D#FFFFFF#000000##FFFFFF
##5A218D1.0010.312.0410.31
#FFFFFF10.311.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.311.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5a218d;
/* rgb */ color: rgb(90, 33, 141);
/* oklch */ color: oklch(39.4% 0.167 303.4);
Tailwind
colors: {
  custom: {
    50: '#8e63af',
    500: '#5a218d',
    950: '#000000',
  },
}
SCSS
$custom: #5a218d;
$custom-light: #8e63af;
$custom-dark: #000000;
JSON
{
  "hex": "#5a218d",
  "rgb": {
    "r": 90,
    "g": 33,
    "b": 141
  },
  "hsl": {
    "h": 271.667,
    "s": 62.069,
    "l": 34.118
  },
  "oklch": {
    "l": 0.39364,
    "c": 0.16731,
    "h": 303.4
  },
  "luminance": 0.05184
}

Semantic roles & 50–950 ramp

primary
#5A218D
secondary
#82BA50
accent
#E5438F
background
#F9F6FA
surface
#F1EBF5
border
#CBC6CF
text
#0D0510
muted
#7E7A7F

Preview Lab

Preview with #5A218D

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

Preview Lab → · Contrast checker → · Palette generator →

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