#5A2F9D#5A2F9D

#5A2F9D is a dark, vivid violet. Relative luminance 0.066; OKLCH L 42.4% C 0.168 H 296.4°. Best body text is #FFFFFF at 9.02:1 contrast (WCAG AA passes).

Color values

HEX#5A2F9D
RGBrgb(90, 47, 157)
HSLhsl(263, 54%, 40%)
HSVhsv(263, 70%, 62%)
CMYKcmyk(42.7%, 70.1%, 0%, 38.4%)
CIE-LABlab(30.97, 43.50, -52.78)
CIE-LCHlch(30.97, 68.40, 309.50°)
OKLaboklab(42.41% 0.0748 -0.1508)
OKLCHoklch(42.41% 0.168 296.4)
XYZxyz(11.3172, 6.6408, 32.5773)
Luminance0.0664 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2F9D #729D2F
analogous
#2F3B9D #5A2F9D #912F9D
triadic
#5A2F9D #9D5A2F #2F9D5A
tetradic
#5A2F9D #9D2F3B #729D2F #2F9D91
square
#5A2F9D #9D2F3B #729D2F #2F9D91
split-complementary
#5A2F9D #9D912F #3B9D2F
monochromatic
#24133F #3F216E #5A2F9D #7643C7 #9872D5

Accessibility & contrast

On white

9.02
#5A2F9D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.33
#5A2F9D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2F9D
9.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2F9D#FFFFFF#000000##FFFFFF
##5A2F9D1.009.022.339.02
#FFFFFF9.021.0021.001.00
#0000002.3321.001.0021.00
##FFFFFF9.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0049A0
Deuteranopia (green-blind)
#00479B
Tritanopia (blue-blind)
#494A62
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #5a2f9d;
/* rgb */ color: rgb(90, 47, 157);
/* oklch */ color: oklch(42.4% 0.168 296.4);
Tailwind
colors: {
  custom: {
    50: '#8f6bbb',
    500: '#5a2f9d',
    950: '#000000',
  },
}
SCSS
$custom: #5a2f9d;
$custom-light: #8f6bbb;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2f9d",
  "rgb": {
    "r": 90,
    "g": 47,
    "b": 157
  },
  "hsl": {
    "h": 263.455,
    "s": 53.922,
    "l": 40
  },
  "oklch": {
    "l": 0.42412,
    "c": 0.16836,
    "h": 296.4
  },
  "luminance": 0.06641
}

Semantic roles & 50–950 ramp

primary
#5A2F9D
secondary
#9DBC6B
accent
#DD4BA4
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5A2F9D

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

Preview Lab → · Contrast checker → · Palette generator →

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