#5A228F#5A228F

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

Color values

HEX#5A228F
RGBrgb(90, 34, 143)
HSLhsl(271, 62%, 35%)
HSVhsv(271, 76%, 56%)
CMYKcmyk(37.1%, 76.2%, 0%, 43.9%)
CIE-LABlab(27.58, 46.20, -49.73)
CIE-LCHlch(27.58, 67.87, 312.89°)
OKLaboklab(39.64% 0.0907 -0.1418)
OKLCHoklch(39.64% 0.168 302.6)
XYZxyz(9.7452, 5.3009, 26.4910)
Luminance0.0530 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A228F #578F22
analogous
#24228F #5A228F #8F228D
triadic
#5A228F #8F5A22 #228F5A
tetradic
#5A228F #8F2422 #578F22 #228D8F
square
#5A228F #8F2422 #578F22 #228D8F
split-complementary
#5A228F #8D8F22 #228F24
monochromatic
#1C0A2C #3B165E #5A228F #792EC0 #9755D7

Accessibility & contrast

On white

10.19
#5A228F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.06
#5A228F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A228F
10.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A228F#FFFFFF#000000##FFFFFF
##5A228F1.0010.192.0610.19
#FFFFFF10.191.0021.001.00
#0000002.0621.001.0021.00
##FFFFFF10.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004092
Deuteranopia (green-blind)
#00418D
Tritanopia (blue-blind)
#4F3E57
Achromatopsia (no color)
#414141

Design tokens & code

CSS
--color: #5a228f;
/* rgb */ color: rgb(90, 34, 143);
/* oklch */ color: oklch(39.6% 0.168 302.6);
Tailwind
colors: {
  custom: {
    50: '#8e63b1',
    500: '#5a228f',
    950: '#000000',
  },
}
SCSS
$custom: #5a228f;
$custom-light: #8e63b1;
$custom-dark: #000000;
JSON
{
  "hex": "#5a228f",
  "rgb": {
    "r": 90,
    "g": 34,
    "b": 143
  },
  "hsl": {
    "h": 270.826,
    "s": 61.582,
    "l": 34.706
  },
  "oklch": {
    "l": 0.39642,
    "c": 0.16831,
    "h": 302.6
  },
  "luminance": 0.05301
}

Semantic roles & 50–950 ramp

primary
#5A228F
secondary
#85BA52
accent
#E54392
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0611
muted
#7E7A80

Preview Lab

Preview with #5A228F

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

Preview Lab → · Contrast checker → · Palette generator →

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