#5F408D#5F408D

#5F408D is a dark, vivid violet. Relative luminance 0.080; OKLCH L 44.4% C 0.124 H 300.0°. Best body text is #FFFFFF at 8.06:1 contrast (WCAG AA passes).

Color values

HEX#5F408D
RGBrgb(95, 64, 141)
HSLhsl(264, 38%, 40%)
HSVhsv(264, 55%, 55%)
CMYKcmyk(32.6%, 54.6%, 0%, 44.7%)
CIE-LABlab(34.03, 30.64, -38.05)
CIE-LCHlch(34.03, 48.85, 308.84°)
OKLaboklab(44.41% 0.0619 -0.1074)
OKLCHoklch(44.41% 0.124 300)
XYZxyz(11.3593, 8.0227, 26.1442)
Luminance0.0802 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F408D #6E8D40
analogous
#40478D #5F408D #85408D
triadic
#5F408D #8D5F40 #408D5F
tetradic
#5F408D #8D4047 #6E8D40 #408D85
square
#5F408D #8D4047 #6E8D40 #408D85
split-complementary
#5F408D #8D8540 #478D40
monochromatic
#261A39 #432D63 #5F408D #7C57B3 #9D81C6

Accessibility & contrast

On white

8.06
#5F408D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.60
#5F408D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5F408D
8.06:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F408D#FFFFFF#000000##FFFFFF
##5F408D1.008.062.608.06
#FFFFFF8.061.0021.001.00
#0000002.6021.001.0021.00
##FFFFFF8.061.0021.001.00

Color blindness preview

Protanopia (red-blind)
#235090
Deuteranopia (green-blind)
#2C4F8B
Tritanopia (blue-blind)
#564F60
Achromatopsia (no color)
#505050

Design tokens & code

CSS
--color: #5f408d;
/* rgb */ color: rgb(95, 64, 141);
/* oklch */ color: oklch(44.4% 0.124 300.0);
Tailwind
colors: {
  custom: {
    50: '#8f76af',
    500: '#5f408d',
    950: '#000000',
  },
}
SCSS
$custom: #5f408d;
$custom-light: #8f76af;
$custom-dark: #000000;
JSON
{
  "hex": "#5f408d",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 141
  },
  "hsl": {
    "h": 264.156,
    "s": 37.561,
    "l": 40.196
  },
  "oklch": {
    "l": 0.44406,
    "c": 0.12399,
    "h": 300
  },
  "luminance": 0.08023
}

Semantic roles & 50–950 ramp

primary
#5F408D
secondary
#9AB078
accent
#CE5A9F
background
#F9F7FA
surface
#F1EDF4
border
#CBC8CE
text
#0D0810
muted
#7E7B7F

Preview Lab

Preview with #5F408D

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

Preview Lab → · Contrast checker → · Palette generator →

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