#5A2FA6#5A2FA6

#5A2FA6 is a dark, vivid violet. Relative luminance 0.070; OKLCH L 43.2% C 0.179 H 294.1°. Best body text is #FFFFFF at 8.78:1 contrast (WCAG AA passes).

Color values

HEX#5A2FA6
RGBrgb(90, 47, 166)
HSLhsl(262, 56%, 42%)
HSVhsv(262, 72%, 65%)
CMYKcmyk(45.8%, 71.7%, 0%, 34.9%)
CIE-LABlab(31.71, 45.96, -57.01)
CIE-LCHlch(31.71, 73.23, 308.87°)
OKLaboklab(43.17% 0.0732 -0.1633)
OKLCHoklch(43.17% 0.179 294.1)
XYZxyz(12.1140, 6.9595, 36.7741)
Luminance0.0696 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2FA6 #7BA62F
analogous
#2F3FA6 #5A2FA6 #962FA6
triadic
#5A2FA6 #A65A2F #2FA65A
tetradic
#5A2FA6 #A62F3F #7BA62F #2FA696
square
#5A2FA6 #A62F3F #7BA62F #2FA696
split-complementary
#5A2FA6 #A6962F #3FA62F
monochromatic
#261447 #402176 #5A2FA6 #7747CB #9A77D8

Accessibility & contrast

On white

8.78
#5A2FA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.39
#5A2FA6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2FA6
8.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2FA6#FFFFFF#000000##FFFFFF
##5A2FA61.008.782.398.78
#FFFFFF8.781.0021.001.00
#0000002.3921.001.0021.00
##FFFFFF8.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004CAA
Deuteranopia (green-blind)
#0049A4
Tritanopia (blue-blind)
#444D67
Achromatopsia (no color)
#4B4B4B

Design tokens & code

CSS
--color: #5a2fa6;
/* rgb */ color: rgb(90, 47, 166);
/* oklch */ color: oklch(43.2% 0.179 294.1);
Tailwind
colors: {
  custom: {
    50: '#906bc1',
    500: '#5a2fa6',
    950: '#000000',
  },
}
SCSS
$custom: #5a2fa6;
$custom-light: #906bc1;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2fa6",
  "rgb": {
    "r": 90,
    "g": 47,
    "b": 166
  },
  "hsl": {
    "h": 261.681,
    "s": 55.869,
    "l": 41.765
  },
  "oklch": {
    "l": 0.43169,
    "c": 0.17891,
    "h": 294.1
  },
  "luminance": 0.0696
}

Semantic roles & 50–950 ramp

primary
#5A2FA6
secondary
#A4C170
accent
#DF49A9
background
#F9F6FC
surface
#F2EBF8
border
#CCC6D1
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5A2FA6

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

Preview Lab → · Contrast checker → · Palette generator →

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