#5A228E#5A228E

#5A228E is a dark, vivid violet. Relative luminance 0.053; OKLCH L 39.6% C 0.167 H 302.9°. Best body text is #FFFFFF at 10.22:1 contrast (WCAG AA passes).

Color values

HEX#5A228E
RGBrgb(90, 34, 142)
HSLhsl(271, 61%, 35%)
HSVhsv(271, 76%, 56%)
CMYKcmyk(36.6%, 76.1%, 0%, 44.3%)
CIE-LABlab(27.49, 45.95, -49.24)
CIE-LCHlch(27.49, 67.35, 313.02°)
OKLaboklab(39.56% 0.0909 -0.1404)
OKLCHoklch(39.56% 0.167 302.9)
XYZxyz(9.6698, 5.2707, 26.0939)
Luminance0.0527 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A228E #568E22
analogous
#24228E #5A228E #8E228C
triadic
#5A228E #8E5A22 #228E5A
tetradic
#5A228E #8E2422 #568E22 #228C8E
square
#5A228E #8E2422 #568E22 #228C8E
split-complementary
#5A228E #8C8E22 #228E24
monochromatic
#1B0A2B #3B165D #5A228E #792EBF #9854D6

Accessibility & contrast

On white

10.22
#5A228E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A228E
10.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A228E#FFFFFF#000000##FFFFFF
##5A228E1.0010.222.0510.22
#FFFFFF10.221.0021.001.00
#0000002.0521.001.0021.00
##FFFFFF10.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004091
Deuteranopia (green-blind)
#00418C
Tritanopia (blue-blind)
#4F3D56
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5a228e;
/* rgb */ color: rgb(90, 34, 142);
/* oklch */ color: oklch(39.6% 0.167 302.9);
Tailwind
colors: {
  custom: {
    50: '#8e63b0',
    500: '#5a228e',
    950: '#000000',
  },
}
SCSS
$custom: #5a228e;
$custom-light: #8e63b0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a228e",
  "rgb": {
    "r": 90,
    "g": 34,
    "b": 142
  },
  "hsl": {
    "h": 271.111,
    "s": 61.364,
    "l": 34.51
  },
  "oklch": {
    "l": 0.39558,
    "c": 0.16724,
    "h": 302.9
  },
  "luminance": 0.05271
}

Semantic roles & 50–950 ramp

primary
#5A228E
secondary
#84BA52
accent
#E44391
background
#F9F6FA
surface
#F1EBF5
border
#CBC6CF
text
#0D0611
muted
#7E7A80

Preview Lab

Preview with #5A228E

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

Preview Lab → · Contrast checker → · Palette generator →

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