#5A228B#5A228B

#5A228B is a dark, vivid violet. Relative luminance 0.052; OKLCH L 39.3% C 0.164 H 303.9°. Best body text is #FFFFFF at 10.31:1 contrast (WCAG AA passes).

Color values

HEX#5A228B
RGBrgb(90, 34, 139)
HSLhsl(272, 61%, 34%)
HSVhsv(272, 76%, 55%)
CMYKcmyk(35.3%, 75.5%, 0%, 45.5%)
CIE-LABlab(27.25, 45.21, -47.78)
CIE-LCHlch(27.25, 65.78, 313.41°)
OKLaboklab(39.31% 0.0916 -0.1361)
OKLCHoklch(39.31% 0.164 303.9)
XYZxyz(9.4476, 5.1818, 24.9236)
Luminance0.0518 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A228B #538B22
analogous
#26228B #5A228B #8B2288
triadic
#5A228B #8B5A22 #228B5A
tetradic
#5A228B #8B2622 #538B22 #22888B
square
#5A228B #8B2622 #538B22 #22888B
split-complementary
#5A228B #888B22 #228B26
monochromatic
#1A0A29 #3A165A #5A228B #7A2EBC #9853D5

Accessibility & contrast

On white

10.31
#5A228B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #5A228B
10.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A228B#FFFFFF#000000##FFFFFF
##5A228B1.0010.312.0410.31
#FFFFFF10.311.0021.001.00
#0000002.0421.001.0021.00
##FFFFFF10.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003F8E
Deuteranopia (green-blind)
#004089
Tritanopia (blue-blind)
#503C55
Achromatopsia (no color)
#404040

Design tokens & code

CSS
--color: #5a228b;
/* rgb */ color: rgb(90, 34, 139);
/* oklch */ color: oklch(39.3% 0.164 303.9);
Tailwind
colors: {
  custom: {
    50: '#8d63ae',
    500: '#5a228b',
    950: '#000000',
  },
}
SCSS
$custom: #5a228b;
$custom-light: #8d63ae;
$custom-dark: #000000;
JSON
{
  "hex": "#5a228b",
  "rgb": {
    "r": 90,
    "g": 34,
    "b": 139
  },
  "hsl": {
    "h": 272,
    "s": 60.694,
    "l": 33.922
  },
  "oklch": {
    "l": 0.39308,
    "c": 0.16402,
    "h": 303.9
  },
  "luminance": 0.05182
}

Semantic roles & 50–950 ramp

primary
#5A228B
secondary
#81B850
accent
#E4448F
background
#F9F6FA
surface
#F1EBF4
border
#CBC6CE
text
#0D0510
muted
#7E7A7F

Preview Lab

Preview with #5A228B

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

Preview Lab → · Contrast checker → · Palette generator →

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