#5E40D7#5E40D7

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

Color values

HEX#5E40D7
RGBrgb(94, 64, 215)
HSLhsl(252, 65%, 55%)
HSVhsv(252, 70%, 84%)
CMYKcmyk(56.3%, 70.2%, 0%, 15.7%)
CIE-LABlab(39.50, 51.65, -73.06)
CIE-LCHlch(39.50, 89.47, 305.26°)
OKLaboklab(50.1% 0.0543 -0.2103)
OKLCHoklch(50.1% 0.217 284.5)
XYZxyz(18.7115, 10.9516, 65.4047)
Luminance0.1095 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5E40D7 #B9D740
analogous
#406DD7 #5E40D7 #AA40D7
triadic
#5E40D7 #D75E40 #40D75E
tetradic
#5E40D7 #D7406D #B9D740 #40D7AA
square
#5E40D7 #D7406D #B9D740 #40D7AA
split-complementary
#5E40D7 #D7AA40 #6DD740
monochromatic
#2F1B81 #4226B4 #5E40D7 #8973E2 #B3A5EC

Accessibility & contrast

On white

6.58
#5E40D7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.19
#5E40D7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5E40D7
6.58:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5E40D7#FFFFFF#000000##FFFFFF
##5E40D71.006.583.196.58
#FFFFFF6.581.0021.001.00
#0000003.1921.001.0021.00
##FFFFFF6.581.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061DB
Deuteranopia (green-blind)
#0058D4
Tritanopia (blue-blind)
#216887
Achromatopsia (no color)
#5D5D5D

Design tokens & code

CSS
--color: #5e40d7;
/* rgb */ color: rgb(94, 64, 215);
/* oklch */ color: oklch(50.1% 0.217 284.5);
Tailwind
colors: {
  custom: {
    50: '#9878e5',
    500: '#5e40d7',
    950: '#000000',
  },
}
SCSS
$custom: #5e40d7;
$custom-light: #9878e5;
$custom-dark: #000000;
JSON
{
  "hex": "#5e40d7",
  "rgb": {
    "r": 94,
    "g": 64,
    "b": 215
  },
  "hsl": {
    "h": 251.921,
    "s": 65.368,
    "l": 54.706
  },
  "oklch": {
    "l": 0.50095,
    "c": 0.21719,
    "h": 284.5
  },
  "luminance": 0.10953
}

Semantic roles & 50–950 ramp

primary
#5E40D7
secondary
#CDD99A
accent
#E83FC7
background
#FAF7FE
surface
#F3EDFC
border
#CDC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5E40D7

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

Preview Lab → · Contrast checker → · Palette generator →

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