#5A2FA1#5A2FA1

#5A2FA1 is a dark, vivid violet. Relative luminance 0.068; OKLCH L 42.7% C 0.173 H 295.4°. Best body text is #FFFFFF at 8.91:1 contrast (WCAG AA passes).

Color values

HEX#5A2FA1
RGBrgb(90, 47, 161)
HSLhsl(263, 55%, 41%)
HSVhsv(263, 71%, 63%)
CMYKcmyk(44.1%, 70.8%, 0%, 36.9%)
CIE-LABlab(31.30, 44.59, -54.67)
CIE-LCHlch(31.30, 70.55, 309.20°)
OKLaboklab(42.75% 0.0741 -0.1564)
OKLCHoklch(42.75% 0.173 295.4)
XYZxyz(11.6643, 6.7796, 34.4053)
Luminance0.0678 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A2FA1 #76A12F
analogous
#2F3DA1 #5A2FA1 #932FA1
triadic
#5A2FA1 #A15A2F #2FA15A
tetradic
#5A2FA1 #A12F3D #76A12F #2FA193
square
#5A2FA1 #A12F3D #76A12F #2FA193
split-complementary
#5A2FA1 #A1932F #3DA12F
monochromatic
#251342 #402172 #5A2FA1 #7645C9 #9974D6

Accessibility & contrast

On white

8.91
#5A2FA1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.36
#5A2FA1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A2FA1
8.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A2FA1#FFFFFF#000000##FFFFFF
##5A2FA11.008.912.368.91
#FFFFFF8.911.0021.001.00
#0000002.3621.001.0021.00
##FFFFFF8.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004BA4
Deuteranopia (green-blind)
#00489F
Tritanopia (blue-blind)
#474B64
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #5a2fa1;
/* rgb */ color: rgb(90, 47, 161);
/* oklch */ color: oklch(42.7% 0.173 295.4);
Tailwind
colors: {
  custom: {
    50: '#8f6bbe',
    500: '#5a2fa1',
    950: '#000000',
  },
}
SCSS
$custom: #5a2fa1;
$custom-light: #8f6bbe;
$custom-dark: #000000;
JSON
{
  "hex": "#5a2fa1",
  "rgb": {
    "r": 90,
    "g": 47,
    "b": 161
  },
  "hsl": {
    "h": 262.632,
    "s": 54.808,
    "l": 40.784
  },
  "oklch": {
    "l": 0.42745,
    "c": 0.17307,
    "h": 295.4
  },
  "luminance": 0.0678
}

Semantic roles & 50–950 ramp

primary
#5A2FA1
secondary
#A0BE6E
accent
#DE4AA6
background
#F9F6FB
surface
#F1EBF7
border
#CBC6D0
text
#0D0712
muted
#7E7A81

Preview Lab

Preview with #5A2FA1

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

Preview Lab → · Contrast checker → · Palette generator →

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