#5A2B97#5A2B97

#5A2B97 is a dark, vivid violet. Relative luminance 0.061; OKLCH L 41.4% C 0.166 H 298.8°. Best body text is #FFFFFF at 9.43:1 contrast (WCAG AA passes).

Color values

HEX#5A2B97
RGBrgb(90, 43, 151)
HSLhsl(266, 56%, 38%)
HSVhsv(266, 72%, 59%)
CMYKcmyk(40.4%, 71.5%, 0%, 40.8%)
CIE-LABlab(29.75, 43.95, -51.11)
CIE-LCHlch(29.75, 67.41, 310.70°)
OKLaboklab(41.39% 0.0801 -0.1459)
OKLCHoklch(41.39% 0.166 298.8)
XYZxyz(10.6648, 6.1356, 29.8946)
Luminance0.0614 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2B97 #68972B
analogous
#2B3297 #5A2B97 #902B97
triadic
#5A2B97 #975A2B #2B975A
tetradic
#5A2B97 #972B32 #68972B #2B9790
square
#5A2B97 #972B32 #68972B #2B9790
split-complementary
#5A2B97 #97902B #32972B
monochromatic
#211038 #3E1D67 #5A2B97 #7639C7 #9768D4

Accessibility & contrast

On white

9.43
#5A2B97 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.23
#5A2B97 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2B97
9.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2B97#FFFFFF#000000##FFFFFF
##5A2B971.009.432.239.43
#FFFFFF9.431.0021.001.00
#0000002.2321.001.0021.00
##FFFFFF9.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00469A
Deuteranopia (green-blind)
#004595
Tritanopia (blue-blind)
#4B455E
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #5a2b97;
/* rgb */ color: rgb(90, 43, 151);
/* oklch */ color: oklch(41.4% 0.166 298.8);
Tailwind
colors: {
  custom: {
    50: '#8e68b6',
    500: '#5a2b97',
    950: '#000000',
  },
}
SCSS
$custom: #5a2b97;
$custom-light: #8e68b6;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2b97",
  "rgb": {
    "r": 90,
    "g": 43,
    "b": 151
  },
  "hsl": {
    "h": 266.111,
    "s": 55.67,
    "l": 38.039
  },
  "oklch": {
    "l": 0.41389,
    "c": 0.16641,
    "h": 298.8
  },
  "luminance": 0.06136
}

Semantic roles & 50–950 ramp

primary
#5A2B97
secondary
#95BB63
accent
#DF499E
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0611
muted
#7E7A80

Preview Lab

Preview with #5A2B97

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

Preview Lab → · Contrast checker → · Palette generator →

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