#5A227E#5A227E

#5A227E is a dark, vivid violet. Relative luminance 0.048; OKLCH L 38.3% C 0.150 H 308.8°. Best body text is #FFFFFF at 10.69:1 contrast (WCAG AA passes).

Color values

HEX#5A227E
RGBrgb(90, 34, 126)
HSLhsl(277, 58%, 31%)
HSVhsv(277, 73%, 49%)
CMYKcmyk(28.6%, 73%, 0%, 50.6%)
CIE-LABlab(26.23, 42.05, -41.29)
CIE-LCHlch(26.23, 58.93, 315.52°)
OKLaboklab(38.27% 0.0939 -0.117)
OKLCHoklch(38.27% 0.15 308.8)
XYZxyz(8.5536, 4.8242, 20.2152)
Luminance0.0482 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A227E #467E22
analogous
#2C227E #5A227E #7E2274
triadic
#5A227E #7E5A22 #227E5A
tetradic
#5A227E #7E2C22 #467E22 #22747E
square
#5A227E #7E2C22 #467E22 #22747E
split-complementary
#5A227E #747E22 #227E2C
monochromatic
#15081E #38154E #5A227E #7C2FAE #9B4CCF

Accessibility & contrast

On white

10.69
#5A227E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.96
#5A227E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A227E
10.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A227E#FFFFFF#000000##FFFFFF
##5A227E1.0010.691.9610.69
#FFFFFF10.691.0021.001.00
#0000001.9621.001.0021.00
##FFFFFF10.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C81
Deuteranopia (green-blind)
#0C3F7C
Tritanopia (blue-blind)
#55374D
Achromatopsia (no color)
#3E3E3E

Design tokens & code

CSS
--color: #5a227e;
/* rgb */ color: rgb(90, 34, 126);
/* oklch */ color: oklch(38.3% 0.150 308.8);
Tailwind
colors: {
  custom: {
    50: '#8c62a4',
    500: '#5a227e',
    950: '#000000',
  },
}
SCSS
$custom: #5a227e;
$custom-light: #8c62a4;
$custom-dark: #000000;
JSON
{
  "hex": "#5a227e",
  "rgb": {
    "r": 90,
    "g": 34,
    "b": 126
  },
  "hsl": {
    "h": 276.522,
    "s": 57.5,
    "l": 31.373
  },
  "oklch": {
    "l": 0.38265,
    "c": 0.15002,
    "h": 308.8
  },
  "luminance": 0.04824
}

Semantic roles & 50–950 ramp

primary
#5A227E
secondary
#73B14B
accent
#E14783
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C050F
muted
#7D7A7F

Preview Lab

Preview with #5A227E

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

Preview Lab → · Contrast checker → · Palette generator →

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