#5F2AA6#5F2AA6

#5F2AA6 is a dark, vivid violet. Relative luminance 0.068; OKLCH L 43.1% C 0.185 H 297.4°. Best body text is #FFFFFF at 8.87:1 contrast (WCAG AA passes).

Color values

HEX#5F2AA6
RGBrgb(95, 42, 166)
HSLhsl(266, 60%, 41%)
HSVhsv(266, 75%, 65%)
CMYKcmyk(42.8%, 74.7%, 0%, 34.9%)
CIE-LABlab(31.44, 49.28, -57.43)
CIE-LCHlch(31.44, 75.68, 310.63°)
OKLaboklab(43.11% 0.0853 -0.1643)
OKLCHoklch(43.11% 0.185 297.4)
XYZxyz(12.4284, 6.8418, 36.7348)
Luminance0.0684 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F2AA6 #71A62A
analogous
#2A33A6 #5F2AA6 #9D2AA6
triadic
#5F2AA6 #A65F2A #2AA65F
tetradic
#5F2AA6 #A62A33 #71A62A #2AA69D
square
#5F2AA6 #A62A33 #71A62A #2AA69D
split-complementary
#5F2AA6 #A69D2A #33A62A
monochromatic
#271144 #431E75 #5F2AA6 #7C3FCE #9D70DB

Accessibility & contrast

On white

8.87
#5F2AA6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.37
#5F2AA6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F2AA6
8.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F2AA6#FFFFFF#000000##FFFFFF
##5F2AA61.008.872.378.87
#FFFFFF8.871.0021.001.00
#0000002.3721.001.0021.00
##FFFFFF8.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#004AAA
Deuteranopia (green-blind)
#0048A4
Tritanopia (blue-blind)
#4D4A66
Achromatopsia (no color)
#4A4A4A

Design tokens & code

CSS
--color: #5f2aa6;
/* rgb */ color: rgb(95, 42, 166);
/* oklch */ color: oklch(43.1% 0.185 297.4);
Tailwind
colors: {
  custom: {
    50: '#9369c1',
    500: '#5f2aa6',
    950: '#000000',
  },
}
SCSS
$custom: #5f2aa6;
$custom-light: #9369c1;
$custom-dark: #000000;
JSON
{
  "hex": "#5f2aa6",
  "rgb": {
    "r": 95,
    "g": 42,
    "b": 166
  },
  "hsl": {
    "h": 265.645,
    "s": 59.615,
    "l": 40.784
  },
  "oklch": {
    "l": 0.43112,
    "c": 0.1851,
    "h": 297.4
  },
  "luminance": 0.06842
}

Semantic roles & 50–950 ramp

primary
#5F2AA6
secondary
#9CC26A
accent
#E3459F
background
#F9F6FC
surface
#F2EBF8
border
#CCC6D1
text
#0E0712
muted
#7E7A81

Preview Lab

Preview with #5F2AA6

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

Preview Lab → · Contrast checker → · Palette generator →

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