#5A228C#5A228C

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

Color values

HEX#5A228C
RGBrgb(90, 34, 140)
HSLhsl(272, 61%, 34%)
HSVhsv(272, 76%, 55%)
CMYKcmyk(35.7%, 75.7%, 0%, 45.1%)
CIE-LABlab(27.33, 45.45, -48.27)
CIE-LCHlch(27.33, 66.30, 313.28°)
OKLaboklab(39.39% 0.0914 -0.1375)
OKLCHoklch(39.39% 0.165 303.6)
XYZxyz(9.5210, 5.2112, 25.3101)
Luminance0.0521 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A228C #548C22
analogous
#25228C #5A228C #8C2289
triadic
#5A228C #8C5A22 #228C5A
tetradic
#5A228C #8C2522 #548C22 #22898C
square
#5A228C #8C2522 #548C22 #22898C
split-complementary
#5A228C #898C22 #228C25
monochromatic
#1B0A2A #3A165B #5A228C #7A2EBD #9853D5

Accessibility & contrast

On white

10.28
#5A228C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A228C
10.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A228C#FFFFFF#000000##FFFFFF
##5A228C1.0010.282.0410.28
#FFFFFF10.281.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.281.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5a228c;
/* rgb */ color: rgb(90, 34, 140);
/* oklch */ color: oklch(39.4% 0.165 303.6);
Tailwind
colors: {
  custom: {
    50: '#8e63ae',
    500: '#5a228c',
    950: '#000000',
  },
}
SCSS
$custom: #5a228c;
$custom-light: #8e63ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5a228c",
  "rgb": {
    "r": 90,
    "g": 34,
    "b": 140
  },
  "hsl": {
    "h": 271.698,
    "s": 60.92,
    "l": 34.118
  },
  "oklch": {
    "l": 0.39391,
    "c": 0.16509,
    "h": 303.6
  },
  "luminance": 0.05211
}

Semantic roles & 50–950 ramp

primary
#5A228C
secondary
#82B951
accent
#E4448F
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0610
muted
#7E7A7F

Preview Lab

Preview with #5A228C

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

Preview Lab → · Contrast checker → · Palette generator →

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