#5A229C#5A229C

#5A229C is a dark, vivid violet. Relative luminance 0.057; OKLCH L 40.8% C 0.182 H 298.7°. Best body text is #FFFFFF at 9.80:1 contrast (WCAG AA passes).

Color values

HEX#5A229C
RGBrgb(90, 34, 156)
HSLhsl(268, 64%, 37%)
HSVhsv(268, 78%, 61%)
CMYKcmyk(42.3%, 78.2%, 0%, 38.8%)
CIE-LABlab(28.69, 49.46, -55.90)
CIE-LCHlch(28.69, 74.64, 311.50°)
OKLaboklab(40.77% 0.0874 -0.1599)
OKLCHoklch(40.77% 0.182 298.7)
XYZxyz(10.7877, 5.7179, 31.9813)
Luminance0.0572 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A229C #649C22
analogous
#22279C #5A229C #97229C
triadic
#5A229C #9C5A22 #229C5A
tetradic
#5A229C #9C2227 #649C22 #229C97
square
#5A229C #9C2227 #649C22 #229C97
split-complementary
#5A229C #9C9722 #279C22
monochromatic
#200C38 #3D176A #5A229C #772DCE #975DDC

Accessibility & contrast

On white

9.80
#5A229C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.14
#5A229C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A229C
9.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A229C#FFFFFF#000000##FFFFFF
##5A229C1.009.802.149.80
#FFFFFF9.801.0021.001.00
#0000002.1421.001.0021.00
##FFFFFF9.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00449F
Deuteranopia (green-blind)
#00429A
Tritanopia (blue-blind)
#4A435E
Achromatopsia (no color)
#444444

Design tokens & code

CSS
--color: #5a229c;
/* rgb */ color: rgb(90, 34, 156);
/* oklch */ color: oklch(40.8% 0.182 298.7);
Tailwind
colors: {
  custom: {
    50: '#8f64ba',
    500: '#5a229c',
    950: '#000000',
  },
}
SCSS
$custom: #5a229c;
$custom-light: #8f64ba;
$custom-dark: #000000;
JSON
{
  "hex": "#5a229c",
  "rgb": {
    "r": 90,
    "g": 34,
    "b": 156
  },
  "hsl": {
    "h": 267.541,
    "s": 64.211,
    "l": 37.255
  },
  "oklch": {
    "l": 0.4077,
    "c": 0.18222,
    "h": 298.7
  },
  "luminance": 0.05718
}

Semantic roles & 50–950 ramp

primary
#5A229C
secondary
#91C05A
accent
#E7419B
background
#F9F6FB
surface
#F2EBF6
border
#CCC6D0
text
#0D0612
muted
#7E7A81

Preview Lab

Preview with #5A229C

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

Preview Lab → · Contrast checker → · Palette generator →

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