#5A2D97#5A2D97

#5A2D97 is a dark, vivid violet. Relative luminance 0.063; OKLCH L 41.7% C 0.164 H 298.4°. Best body text is #FFFFFF at 9.30:1 contrast (WCAG AA passes).

Color values

HEX#5A2D97
RGBrgb(90, 45, 151)
HSLhsl(265, 54%, 38%)
HSVhsv(265, 70%, 59%)
CMYKcmyk(40.4%, 70.2%, 0%, 40.8%)
CIE-LABlab(30.12, 42.93, -50.51)
CIE-LCHlch(30.12, 66.29, 310.36°)
OKLaboklab(41.65% 0.0779 -0.1441)
OKLCHoklch(41.65% 0.164 298.4)
XYZxyz(10.7393, 6.2846, 29.9194)
Luminance0.0629 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2D97 #6A972D
analogous
#2D3597 #5A2D97 #8F2D97
triadic
#5A2D97 #975A2D #2D975A
tetradic
#5A2D97 #972D35 #6A972D #2D978F
square
#5A2D97 #972D35 #6A972D #2D978F
split-complementary
#5A2D97 #978F2D #35972D
monochromatic
#221139 #3E1F68 #5A2D97 #763CC5 #976BD3

Accessibility & contrast

On white

9.30
#5A2D97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.26
#5A2D97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2D97
9.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2D97#FFFFFF#000000##FFFFFF
##5A2D971.009.302.269.30
#FFFFFF9.301.0021.001.00
#0000002.2621.001.0021.00
##FFFFFF9.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00479A
Deuteranopia (green-blind)
#004695
Tritanopia (blue-blind)
#4B465E
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #5a2d97;
/* rgb */ color: rgb(90, 45, 151);
/* oklch */ color: oklch(41.7% 0.164 298.4);
Tailwind
colors: {
  custom: {
    50: '#8e69b6',
    500: '#5a2d97',
    950: '#000000',
  },
}
SCSS
$custom: #5a2d97;
$custom-light: #8e69b6;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2d97",
  "rgb": {
    "r": 90,
    "g": 45,
    "b": 151
  },
  "hsl": {
    "h": 265.472,
    "s": 54.082,
    "l": 38.431
  },
  "oklch": {
    "l": 0.41651,
    "c": 0.16386,
    "h": 298.4
  },
  "luminance": 0.06285
}

Semantic roles & 50–950 ramp

primary
#5A2D97
secondary
#96BA66
accent
#DD4A9F
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0711
muted
#7E7A80

Preview Lab

Preview with #5A2D97

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

Preview Lab → · Contrast checker → · Palette generator →

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