#5F40D1#5F40D1

#5F40D1 is a mid, highly saturated violet. Relative luminance 0.107; OKLCH L 49.7% C 0.210 H 285.7°. Best body text is #FFFFFF at 6.69:1 contrast (WCAG AA passes).

Color values

HEX#5F40D1
RGBrgb(95, 64, 209)
HSLhsl(253, 61%, 54%)
HSVhsv(253, 69%, 82%)
CMYKcmyk(54.5%, 69.4%, 0%, 18%)
CIE-LABlab(39.07, 50.05, -70.30)
CIE-LCHlch(39.07, 86.30, 305.45°)
OKLaboklab(49.66% 0.0568 -0.2022)
OKLCHoklch(49.66% 0.21 285.7)
XYZxyz(18.0579, 10.7021, 61.4234)
Luminance0.1070 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40D1 #B2D140
analogous
#4069D1 #5F40D1 #A840D1
triadic
#5F40D1 #D15F40 #40D15F
tetradic
#5F40D1 #D14069 #B2D140 #40D1A8
square
#5F40D1 #D14069 #B2D140 #40D1A8
split-complementary
#5F40D1 #D1A840 #69D140
monochromatic
#311D79 #4529AB #5F40D1 #8871DD #B2A3E9

Accessibility & contrast

On white

6.69
#5F40D1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.14
#5F40D1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40D1
6.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40D1#FFFFFF#000000##FFFFFF
##5F40D11.006.693.146.69
#FFFFFF6.691.0021.001.00
#0000003.1421.001.0021.00
##FFFFFF6.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060D5
Deuteranopia (green-blind)
#0058CE
Tritanopia (blue-blind)
#2D6684
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #5f40d1;
/* rgb */ color: rgb(95, 64, 209);
/* oklch */ color: oklch(49.7% 0.210 285.7);
Tailwind
colors: {
  custom: {
    50: '#9777e0',
    500: '#5f40d1',
    950: '#000000',
  },
}
SCSS
$custom: #5f40d1;
$custom-light: #9777e0;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40d1",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 209
  },
  "hsl": {
    "h": 252.828,
    "s": 61.181,
    "l": 53.529
  },
  "oklch": {
    "l": 0.49656,
    "c": 0.20999,
    "h": 285.7
  },
  "luminance": 0.10703
}

Semantic roles & 50–950 ramp

primary
#5F40D1
secondary
#C8D597
accent
#E444C2
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0F0915
muted
#7E7B83

Preview Lab

Preview with #5F40D1

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

Preview Lab → · Contrast checker → · Palette generator →

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