#5A2F9C#5A2F9C

#5A2F9C is a dark, vivid violet. Relative luminance 0.066; OKLCH L 42.3% C 0.167 H 296.7°. Best body text is #FFFFFF at 9.05:1 contrast (WCAG AA passes).

Color values

HEX#5A2F9C
RGBrgb(90, 47, 156)
HSLhsl(264, 54%, 40%)
HSVhsv(264, 70%, 61%)
CMYKcmyk(42.3%, 69.9%, 0%, 38.8%)
CIE-LABlab(30.89, 43.23, -52.30)
CIE-LCHlch(30.89, 67.85, 309.58°)
OKLaboklab(42.33% 0.075 -0.1494)
OKLCHoklch(42.33% 0.167 296.7)
XYZxyz(11.2321, 6.6068, 32.1295)
Luminance0.0661 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2F9C #719C2F
analogous
#2F3A9C #5A2F9C #912F9C
triadic
#5A2F9C #9C5A2F #2F9C5A
tetradic
#5A2F9C #9C2F3A #719C2F #2F9C91
square
#5A2F9C #9C2F3A #719C2F #2F9C91
split-complementary
#5A2F9C #9C912F #3A9C2F
monochromatic
#24133E #3F216D #5A2F9C #7642C6 #9871D4

Accessibility & contrast

On white

9.05
#5A2F9C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.32
#5A2F9C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2F9C
9.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2F9C#FFFFFF#000000##FFFFFF
##5A2F9C1.009.052.329.05
#FFFFFF9.051.0021.001.00
#0000002.3221.001.0021.00
##FFFFFF9.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00499F
Deuteranopia (green-blind)
#00479A
Tritanopia (blue-blind)
#494962
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #5a2f9c;
/* rgb */ color: rgb(90, 47, 156);
/* oklch */ color: oklch(42.3% 0.167 296.7);
Tailwind
colors: {
  custom: {
    50: '#8e6bba',
    500: '#5a2f9c',
    950: '#000000',
  },
}
SCSS
$custom: #5a2f9c;
$custom-light: #8e6bba;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2f9c",
  "rgb": {
    "r": 90,
    "g": 47,
    "b": 156
  },
  "hsl": {
    "h": 263.67,
    "s": 53.695,
    "l": 39.804
  },
  "oklch": {
    "l": 0.42329,
    "c": 0.16717,
    "h": 296.7
  },
  "luminance": 0.06607
}

Semantic roles & 50–950 ramp

primary
#5A2F9C
secondary
#9CBC6B
accent
#DD4BA3
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5A2F9C

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

Preview Lab → · Contrast checker → · Palette generator →

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