#5A229D#5A229D

#5A229D is a dark, vivid violet. Relative luminance 0.058; OKLCH L 40.9% C 0.183 H 298.4°. Best body text is #FFFFFF at 9.77:1 contrast (WCAG AA passes).

Color values

HEX#5A229D
RGBrgb(90, 34, 157)
HSLhsl(267, 64%, 37%)
HSVhsv(267, 78%, 62%)
CMYKcmyk(42.7%, 78.3%, 0%, 38.4%)
CIE-LABlab(28.78, 49.71, -56.36)
CIE-LCHlch(28.78, 75.15, 311.41°)
OKLaboklab(40.86% 0.0871 -0.1613)
OKLCHoklch(40.86% 0.183 298.4)
XYZxyz(10.8727, 5.7519, 32.4291)
Luminance0.0575 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A229D #659D22
analogous
#22289D #5A229D #98229D
triadic
#5A229D #9D5A22 #229D5A
tetradic
#5A229D #9D2228 #659D22 #229D98
square
#5A229D #9D2228 #659D22 #229D98
split-complementary
#5A229D #9D9822 #289D22
monochromatic
#200C38 #3D176B #5A229D #772DCF #975DDC

Accessibility & contrast

On white

9.77
#5A229D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.15
#5A229D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A229D
9.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A229D#FFFFFF#000000##FFFFFF
##5A229D1.009.772.159.77
#FFFFFF9.771.0021.001.00
#0000002.1521.001.0021.00
##FFFFFF9.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0044A0
Deuteranopia (green-blind)
#00439B
Tritanopia (blue-blind)
#49435F
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #5a229d;
/* rgb */ color: rgb(90, 34, 157);
/* oklch */ color: oklch(40.9% 0.183 298.4);
Tailwind
colors: {
  custom: {
    50: '#8f64bb',
    500: '#5a229d',
    950: '#000000',
  },
}
SCSS
$custom: #5a229d;
$custom-light: #8f64bb;
$custom-dark: #000000;
JSON
{
  "hex": "#5a229d",
  "rgb": {
    "r": 90,
    "g": 34,
    "b": 157
  },
  "hsl": {
    "h": 267.317,
    "s": 64.398,
    "l": 37.451
  },
  "oklch": {
    "l": 0.40859,
    "c": 0.18329,
    "h": 298.4
  },
  "luminance": 0.05752
}

Semantic roles & 50–950 ramp

primary
#5A229D
secondary
#92C15A
accent
#E7409B
background
#F9F6FB
surface
#F2EBF6
border
#CCC6D0
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #5A229D

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

Preview Lab → · Contrast checker → · Palette generator →

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