#5A2F9F#5A2F9F

#5A2F9F is a dark, vivid violet. Relative luminance 0.067; OKLCH L 42.6% C 0.171 H 295.9°. Best body text is #FFFFFF at 8.97:1 contrast (WCAG AA passes).

Color values

HEX#5A2F9F
RGBrgb(90, 47, 159)
HSLhsl(263, 54%, 40%)
HSVhsv(263, 70%, 62%)
CMYKcmyk(43.4%, 70.4%, 0%, 37.6%)
CIE-LABlab(31.14, 44.05, -53.73)
CIE-LCHlch(31.14, 69.48, 309.35°)
OKLaboklab(42.58% 0.0745 -0.1536)
OKLCHoklch(42.58% 0.171 295.9)
XYZxyz(11.4893, 6.7096, 33.4839)
Luminance0.0671 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2F9F #749F2F
analogous
#2F3C9F #5A2F9F #922F9F
triadic
#5A2F9F #9F5A2F #2F9F5A
tetradic
#5A2F9F #9F2F3C #749F2F #2F9F92
square
#5A2F9F #9F2F3C #749F2F #2F9F92
split-complementary
#5A2F9F #9F922F #3C9F2F
monochromatic
#251341 #3F2170 #5A2F9F #7644C8 #9973D6

Accessibility & contrast

On white

8.97
#5A2F9F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.34
#5A2F9F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2F9F
8.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2F9F#FFFFFF#000000##FFFFFF
##5A2F9F1.008.972.348.97
#FFFFFF8.971.0021.001.00
#0000002.3421.001.0021.00
##FFFFFF8.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AA2
Deuteranopia (green-blind)
#00489D
Tritanopia (blue-blind)
#484B63
Achromatopsia (no color)
#494949

Design tokens & code

CSS
--color: #5a2f9f;
/* rgb */ color: rgb(90, 47, 159);
/* oklch */ color: oklch(42.6% 0.171 295.9);
Tailwind
colors: {
  custom: {
    50: '#8f6bbc',
    500: '#5a2f9f',
    950: '#000000',
  },
}
SCSS
$custom: #5a2f9f;
$custom-light: #8f6bbc;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2f9f",
  "rgb": {
    "r": 90,
    "g": 47,
    "b": 159
  },
  "hsl": {
    "h": 263.036,
    "s": 54.369,
    "l": 40.392
  },
  "oklch": {
    "l": 0.42578,
    "c": 0.17071,
    "h": 295.9
  },
  "luminance": 0.0671
}

Semantic roles & 50–950 ramp

primary
#5A2F9F
secondary
#9EBD6D
accent
#DE4AA5
background
#F9F6FB
surface
#F1EBF6
border
#CBC6D0
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5A2F9F

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

Preview Lab → · Contrast checker → · Palette generator →

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