#5A2B87#5A2B87

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

Color values

HEX#5A2B87
RGBrgb(90, 43, 135)
HSLhsl(271, 52%, 35%)
HSVhsv(271, 68%, 53%)
CMYKcmyk(33.3%, 68.1%, 0%, 47.1%)
CIE-LABlab(28.51, 39.79, -43.24)
CIE-LCHlch(28.51, 58.76, 312.62°)
OKLaboklab(40.11% 0.0824 -0.1228)
OKLCHoklch(40.11% 0.148 303.9)
XYZxyz(9.4525, 5.6507, 23.5097)
Luminance0.0565 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2B87 #58872B
analogous
#2C2B87 #5A2B87 #872B86
triadic
#5A2B87 #875A2B #2B875A
tetradic
#5A2B87 #872C2B #58872B #2B8687
square
#5A2B87 #872C2B #58872B #2B8687
split-complementary
#5A2B87 #86872B #2B872C
monochromatic
#1C0D2A #3B1C59 #5A2B87 #793AB5 #9760CC

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##5A2B87#FFFFFF#000000##FFFFFF
##5A2B871.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)
#00428A
Deuteranopia (green-blind)
#0A4385
Tritanopia (blue-blind)
#513F55
Achromatopsia (no color)
#434343

Design tokens & code

CSS
--color: #5a2b87;
/* rgb */ color: rgb(90, 43, 135);
/* oklch */ color: oklch(40.1% 0.148 303.9);
Tailwind
colors: {
  custom: {
    50: '#8d68ab',
    500: '#5a2b87',
    950: '#000000',
  },
}
SCSS
$custom: #5a2b87;
$custom-light: #8d68ab;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2b87",
  "rgb": {
    "r": 90,
    "g": 43,
    "b": 135
  },
  "hsl": {
    "h": 270.652,
    "s": 51.685,
    "l": 34.902
  },
  "oklch": {
    "l": 0.40113,
    "c": 0.14785,
    "h": 303.9
  },
  "luminance": 0.05651
}

Semantic roles & 50–950 ramp

primary
#5A2B87
secondary
#86B25B
accent
#DB4D92
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0610
muted
#7D7A7F

Preview Lab

Preview with #5A2B87

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

Preview Lab → · Contrast checker → · Palette generator →

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