#5A229A#5A229A

#5A229A is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.6% C 0.180 H 299.2°. Best body text is #FFFFFF at 9.86:1 contrast (WCAG AA passes).

Color values

HEX#5A229A
RGBrgb(90, 34, 154)
HSLhsl(268, 64%, 37%)
HSVhsv(268, 78%, 60%)
CMYKcmyk(41.6%, 77.9%, 0%, 39.6%)
CIE-LABlab(28.51, 48.95, -54.96)
CIE-LCHlch(28.51, 73.60, 311.69°)
OKLaboklab(40.59% 0.0879 -0.1572)
OKLCHoklch(40.59% 0.18 299.2)
XYZxyz(10.6197, 5.6507, 31.0968)
Luminance0.0565 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A229A #629A22
analogous
#22269A #5A229A #96229A
triadic
#5A229A #9A5A22 #229A5A
tetradic
#5A229A #9A2226 #629A22 #229A96
square
#5A229A #9A2226 #629A22 #229A96
split-complementary
#5A229A #9A9622 #269A22
monochromatic
#1F0C36 #3D1768 #5A229A #772DCC #975BDB

Accessibility & contrast

On white

9.86
#5A229A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.13
#5A229A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A229A
9.86:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A229A#FFFFFF#000000##FFFFFF
##5A229A1.009.862.139.86
#FFFFFF9.861.0021.001.00
#0000002.1321.001.0021.00
##FFFFFF9.861.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00439D
Deuteranopia (green-blind)
#004298
Tritanopia (blue-blind)
#4A425D
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #5a229a;
/* rgb */ color: rgb(90, 34, 154);
/* oklch */ color: oklch(40.6% 0.180 299.2);
Tailwind
colors: {
  custom: {
    50: '#8f64b9',
    500: '#5a229a',
    950: '#000000',
  },
}
SCSS
$custom: #5a229a;
$custom-light: #8f64b9;
$custom-dark: #000000;
JSON
{
  "hex": "#5a229a",
  "rgb": {
    "r": 90,
    "g": 34,
    "b": 154
  },
  "hsl": {
    "h": 268,
    "s": 63.83,
    "l": 36.863
  },
  "oklch": {
    "l": 0.40592,
    "c": 0.18009,
    "h": 299.2
  },
  "luminance": 0.05651
}

Semantic roles & 50–950 ramp

primary
#5A229A
secondary
#8FBF58
accent
#E74199
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #5A229A

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

Preview Lab → · Contrast checker → · Palette generator →

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