#5A2F8A#5A2F8A

#5A2F8A is a dark, vivid violet. Relative luminance 0.060; OKLCH L 40.9% C 0.146 H 302.0°. Best body text is #FFFFFF at 9.51:1 contrast (WCAG AA passes).

Color values

HEX#5A2F8A
RGBrgb(90, 47, 138)
HSLhsl(268, 49%, 36%)
HSVhsv(268, 66%, 54%)
CMYKcmyk(34.8%, 65.9%, 0%, 45.9%)
CIE-LABlab(29.52, 38.42, -43.48)
CIE-LCHlch(29.52, 58.02, 311.46°)
OKLaboklab(40.91% 0.0773 -0.1235)
OKLCHoklch(40.91% 0.146 302)
XYZxyz(9.8193, 6.0416, 24.6887)
Luminance0.0604 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2F8A #5F8A2F
analogous
#2F328A #5A2F8A #882F8A
triadic
#5A2F8A #8A5A2F #2F8A5A
tetradic
#5A2F8A #8A2F32 #5F8A2F #2F8A88
square
#5A2F8A #8A2F32 #5F8A2F #2F8A88
split-complementary
#5A2F8A #8A882F #328A2F
monochromatic
#1E102F #3C1F5C #5A2F8A #783FB8 #9768CC

Accessibility & contrast

On white

9.51
#5A2F8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.21
#5A2F8A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2F8A
9.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2F8A#FFFFFF#000000##FFFFFF
##5A2F8A1.009.512.219.51
#FFFFFF9.511.0021.001.00
#0000002.2121.001.0021.00
##FFFFFF9.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00458D
Deuteranopia (green-blind)
#0D4588
Tritanopia (blue-blind)
#504358
Achromatopsia (no color)
#464646

Design tokens & code

CSS
--color: #5a2f8a;
/* rgb */ color: rgb(90, 47, 138);
/* oklch */ color: oklch(40.9% 0.146 302.0);
Tailwind
colors: {
  custom: {
    50: '#8d6aad',
    500: '#5a2f8a',
    950: '#000000',
  },
}
SCSS
$custom: #5a2f8a;
$custom-light: #8d6aad;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2f8a",
  "rgb": {
    "r": 90,
    "g": 47,
    "b": 138
  },
  "hsl": {
    "h": 268.352,
    "s": 49.189,
    "l": 36.275
  },
  "oklch": {
    "l": 0.40906,
    "c": 0.14568,
    "h": 302
  },
  "luminance": 0.06042
}

Semantic roles & 50–950 ramp

primary
#5A2F8A
secondary
#8DB362
accent
#D94F98
background
#F8F6FA
surface
#F0EBF4
border
#CBC6CE
text
#0C0710
muted
#7D7A7F

Preview Lab

Preview with #5A2F8A

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

Preview Lab → · Contrast checker → · Palette generator →

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