#5E40D8#5E40D8

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

Color values

HEX#5E40D8
RGBrgb(94, 64, 216)
HSLhsl(252, 66%, 55%)
HSVhsv(252, 70%, 85%)
CMYKcmyk(56.5%, 70.4%, 0%, 15.3%)
CIE-LABlab(39.59, 51.94, -73.50)
CIE-LCHlch(39.59, 90.00, 305.25°)
OKLaboklab(50.18% 0.0541 -0.2116)
OKLCHoklch(50.18% 0.218 284.3)
XYZxyz(18.8404, 11.0032, 66.0835)
Luminance0.1100 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5E40D8 #BAD840
analogous
#406ED8 #5E40D8 #AA40D8
triadic
#5E40D8 #D85E40 #40D85E
tetradic
#5E40D8 #D8406E #BAD840 #40D8AA
square
#5E40D8 #D8406E #BAD840 #40D8AA
split-complementary
#5E40D8 #D8AA40 #6ED840
monochromatic
#2F1B83 #4225B6 #5E40D8 #8973E2 #B4A6ED

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##5E40D8#FFFFFF#000000##FFFFFF
##5E40D81.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)
#0062DD
Deuteranopia (green-blind)
#0058D5
Tritanopia (blue-blind)
#1F6988
Achromatopsia (no color)
#5D5D5D

Design tokens & code

CSS
--color: #5e40d8;
/* rgb */ color: rgb(94, 64, 216);
/* oklch */ color: oklch(50.2% 0.218 284.3);
Tailwind
colors: {
  custom: {
    50: '#9878e5',
    500: '#5e40d8',
    950: '#000000',
  },
}
SCSS
$custom: #5e40d8;
$custom-light: #9878e5;
$custom-dark: #000000;
JSON
{
  "hex": "#5e40d8",
  "rgb": {
    "r": 94,
    "g": 64,
    "b": 216
  },
  "hsl": {
    "h": 251.842,
    "s": 66.087,
    "l": 54.902
  },
  "oklch": {
    "l": 0.50184,
    "c": 0.21837,
    "h": 284.3
  },
  "luminance": 0.11004
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #5E40D8

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

Preview Lab → · Contrast checker → · Palette generator →

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