#5F40D7#5F40D7

#5F40D7 is a mid, highly saturated violet. Relative luminance 0.110; OKLCH L 50.2% C 0.217 H 284.9°. Best body text is #FFFFFF at 6.56:1 contrast (WCAG AA passes).

Color values

HEX#5F40D7
RGBrgb(95, 64, 215)
HSLhsl(252, 65%, 55%)
HSVhsv(252, 70%, 84%)
CMYKcmyk(55.8%, 70.2%, 0%, 15.7%)
CIE-LABlab(39.59, 51.79, -72.91)
CIE-LCHlch(39.59, 89.44, 305.39°)
OKLaboklab(50.18% 0.0557 -0.2098)
OKLCHoklch(50.18% 0.217 284.9)
XYZxyz(18.8147, 11.0049, 65.4095)
Luminance0.1101 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40D7 #B8D740
analogous
#406DD7 #5F40D7 #AB40D7
triadic
#5F40D7 #D75F40 #40D75F
tetradic
#5F40D7 #D7406D #B8D740 #40D7AB
square
#5F40D7 #D7406D #B8D740 #40D7AB
split-complementary
#5F40D7 #D7AB40 #6DD740
monochromatic
#301B81 #4326B4 #5F40D7 #8973E2 #B4A5EC

Accessibility & contrast

On white

6.56
#5F40D7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.20
#5F40D7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40D7
6.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40D7#FFFFFF#000000##FFFFFF
##5F40D71.006.563.206.56
#FFFFFF6.561.0021.001.00
#0000003.2021.001.0021.00
##FFFFFF6.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062DB
Deuteranopia (green-blind)
#0059D4
Tritanopia (blue-blind)
#256887
Achromatopsia (no color)
#5D5D5D

Design tokens & code

CSS
--color: #5f40d7;
/* rgb */ color: rgb(95, 64, 215);
/* oklch */ color: oklch(50.2% 0.217 284.9);
Tailwind
colors: {
  custom: {
    50: '#9878e5',
    500: '#5f40d7',
    950: '#000000',
  },
}
SCSS
$custom: #5f40d7;
$custom-light: #9878e5;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40d7",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 215
  },
  "hsl": {
    "h": 252.318,
    "s": 65.368,
    "l": 54.706
  },
  "oklch": {
    "l": 0.50181,
    "c": 0.21708,
    "h": 284.9
  },
  "luminance": 0.11006
}

Semantic roles & 50–950 ramp

primary
#5F40D7
secondary
#CCD99A
accent
#E83FC6
background
#FAF7FE
surface
#F3EDFC
border
#CDC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F40D7

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

Preview Lab → · Contrast checker → · Palette generator →

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