#5A2F9A#5A2F9A

#5A2F9A is a dark, vivid violet. Relative luminance 0.065; OKLCH L 42.2% C 0.165 H 297.2°. Best body text is #FFFFFF at 9.10:1 contrast (WCAG AA passes).

Color values

HEX#5A2F9A
RGBrgb(90, 47, 154)
HSLhsl(264, 53%, 39%)
HSVhsv(264, 69%, 60%)
CMYKcmyk(41.6%, 69.5%, 0%, 39.6%)
CIE-LABlab(30.73, 42.69, -51.34)
CIE-LCHlch(30.73, 66.77, 309.75°)
OKLaboklab(42.17% 0.0753 -0.1466)
OKLCHoklch(42.17% 0.165 297.2)
XYZxyz(11.0642, 6.5396, 31.2449)
Luminance0.0654 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2F9A #6F9A2F
analogous
#2F3A9A #5A2F9A #902F9A
triadic
#5A2F9A #9A5A2F #2F9A5A
tetradic
#5A2F9A #9A2F3A #6F9A2F #2F9A90
square
#5A2F9A #9A2F3A #6F9A2F #2F9A90
split-complementary
#5A2F9A #9A902F #3A9A2F
monochromatic
#23123C #3F216B #5A2F9A #7641C5 #9870D3

Accessibility & contrast

On white

9.10
#5A2F9A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.31
#5A2F9A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2F9A
9.10:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2F9A#FFFFFF#000000##FFFFFF
##5A2F9A1.009.102.319.10
#FFFFFF9.101.0021.001.00
#0000002.3121.001.0021.00
##FFFFFF9.101.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00499D
Deuteranopia (green-blind)
#004798
Tritanopia (blue-blind)
#4A4961
Achromatopsia (no color)
#484848

Design tokens & code

CSS
--color: #5a2f9a;
/* rgb */ color: rgb(90, 47, 154);
/* oklch */ color: oklch(42.2% 0.165 297.2);
Tailwind
colors: {
  custom: {
    50: '#8e6bb9',
    500: '#5a2f9a',
    950: '#000000',
  },
}
SCSS
$custom: #5a2f9a;
$custom-light: #8e6bb9;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2f9a",
  "rgb": {
    "r": 90,
    "g": 47,
    "b": 154
  },
  "hsl": {
    "h": 264.112,
    "s": 53.234,
    "l": 39.412
  },
  "oklch": {
    "l": 0.42165,
    "c": 0.16482,
    "h": 297.2
  },
  "luminance": 0.0654
}

Semantic roles & 50–950 ramp

primary
#5A2F9A
secondary
#9ABB6A
accent
#DD4BA2
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0711
muted
#7E7A80

Preview Lab

Preview with #5A2F9A

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

Preview Lab → · Contrast checker → · Palette generator →

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