#5F40D8#5F40D8

#5F40D8 is a mid, highly saturated violet. Relative luminance 0.111; OKLCH L 50.3% C 0.218 H 284.7°. Best body text is #FFFFFF at 6.54:1 contrast (WCAG AA passes).

Color values

HEX#5F40D8
RGBrgb(95, 64, 216)
HSLhsl(252, 66%, 55%)
HSVhsv(252, 70%, 85%)
CMYKcmyk(56%, 70.4%, 0%, 15.3%)
CIE-LABlab(39.68, 52.08, -73.34)
CIE-LCHlch(39.68, 89.96, 305.38°)
OKLaboklab(50.27% 0.0555 -0.2111)
OKLCHoklch(50.27% 0.218 284.7)
XYZxyz(18.9436, 11.0564, 66.0883)
Luminance0.1106 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5F40D8 #B9D840
analogous
#406DD8 #5F40D8 #AB40D8
triadic
#5F40D8 #D85F40 #40D85F
tetradic
#5F40D8 #D8406D #B9D840 #40D8AB
square
#5F40D8 #D8406D #B9D840 #40D8AB
split-complementary
#5F40D8 #D8AB40 #6DD840
monochromatic
#301B83 #4325B6 #5F40D8 #8A73E2 #B4A6ED

Accessibility & contrast

On white

6.54
#5F40D8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.21
#5F40D8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5F40D8
6.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5F40D8#FFFFFF#000000##FFFFFF
##5F40D81.006.543.216.54
#FFFFFF6.541.0021.001.00
#0000003.2121.001.0021.00
##FFFFFF6.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062DD
Deuteranopia (green-blind)
#0059D5
Tritanopia (blue-blind)
#236988
Achromatopsia (no color)
#5D5D5D

Design tokens & code

CSS
--color: #5f40d8;
/* rgb */ color: rgb(95, 64, 216);
/* oklch */ color: oklch(50.3% 0.218 284.7);
Tailwind
colors: {
  custom: {
    50: '#9878e5',
    500: '#5f40d8',
    950: '#000000',
  },
}
SCSS
$custom: #5f40d8;
$custom-light: #9878e5;
$custom-dark: #000000;
JSON
{
  "hex": "#5f40d8",
  "rgb": {
    "r": 95,
    "g": 64,
    "b": 216
  },
  "hsl": {
    "h": 252.237,
    "s": 66.087,
    "l": 54.902
  },
  "oklch": {
    "l": 0.50269,
    "c": 0.21826,
    "h": 284.7
  },
  "luminance": 0.11058
}

Semantic roles & 50–950 ramp

primary
#5F40D8
secondary
#CDDA9A
accent
#E93FC6
background
#FAF7FE
surface
#F3EDFC
border
#CDC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5F40D8

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

Preview Lab → · Contrast checker → · Palette generator →

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