#5A228D#5A228D

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

Color values

HEX#5A228D
RGBrgb(90, 34, 141)
HSLhsl(271, 61%, 34%)
HSVhsv(271, 76%, 55%)
CMYKcmyk(36.2%, 75.9%, 0%, 44.7%)
CIE-LABlab(27.41, 45.70, -48.76)
CIE-LCHlch(27.41, 66.83, 313.15°)
OKLaboklab(39.47% 0.0912 -0.1389)
OKLCHoklch(39.47% 0.166 303.3)
XYZxyz(9.5951, 5.2408, 25.7002)
Luminance0.0524 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A228D #558D22
analogous
#25228D #5A228D #8D228B
triadic
#5A228D #8D5A22 #228D5A
tetradic
#5A228D #8D2522 #558D22 #228B8D
square
#5A228D #8D2522 #558D22 #228B8D
split-complementary
#5A228D #8B8D22 #228D25
monochromatic
#1B0A2A #3B165C #5A228D #792EBE #9854D6

Accessibility & contrast

On white

10.25
#5A228D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.05
#5A228D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A228D
10.25:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A228D#FFFFFF#000000##FFFFFF
##5A228D1.0010.252.0510.25
#FFFFFF10.251.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.251.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004090
Deuteranopia (green-blind)
#00408B
Tritanopia (blue-blind)
#503D56
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5a228d;
/* rgb */ color: rgb(90, 34, 141);
/* oklch */ color: oklch(39.5% 0.166 303.3);
Tailwind
colors: {
  custom: {
    50: '#8e63af',
    500: '#5a228d',
    950: '#000000',
  },
}
SCSS
$custom: #5a228d;
$custom-light: #8e63af;
$custom-dark: #000000;
JSON
{
  "hex": "#5a228d",
  "rgb": {
    "r": 90,
    "g": 34,
    "b": 141
  },
  "hsl": {
    "h": 271.402,
    "s": 61.143,
    "l": 34.314
  },
  "oklch": {
    "l": 0.39474,
    "c": 0.16616,
    "h": 303.3
  },
  "luminance": 0.05241
}

Semantic roles & 50–950 ramp

primary
#5A228D
secondary
#83B951
accent
#E44490
background
#F9F6FA
surface
#F1EBF5
border
#CBC6CF
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5A228D

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

Preview Lab → · Contrast checker → · Palette generator →

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