#5E40DC#5E40DC

#5E40DC is a mid, highly saturated violet. Relative luminance 0.112; OKLCH L 50.5% C 0.223 H 283.8°. Best body text is #FFFFFF at 6.48:1 contrast (WCAG AA passes).

Color values

HEX#5E40DC
RGBrgb(94, 64, 220)
HSLhsl(252, 69%, 56%)
HSVhsv(252, 71%, 86%)
CMYKcmyk(57.3%, 70.9%, 0%, 13.7%)
CIE-LABlab(39.94, 53.10, -75.21)
CIE-LCHlch(39.94, 92.07, 305.22°)
OKLaboklab(50.54% 0.0534 -0.2166)
OKLCHoklch(50.54% 0.223 283.8)
XYZxyz(19.3638, 11.2126, 68.8401)
Luminance0.1121 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5E40DC #BEDC40
analogous
#4070DC #5E40DC #AC40DC
triadic
#5E40DC #DC5E40 #40DC5E
tetradic
#5E40DC #DC4070 #BEDC40 #40DCAC
square
#5E40DC #DC4070 #BEDC40 #40DCAC
split-complementary
#5E40DC #DCAC40 #70DC40
monochromatic
#2E1989 #4023BC #5E40DC #8A74E5 #B5A7EF

Accessibility & contrast

On white

6.48
#5E40DC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.24
#5E40DC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5E40DC
6.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5E40DC#FFFFFF#000000##FFFFFF
##5E40DC1.006.483.246.48
#FFFFFF6.481.0021.001.00
#0000003.2421.001.0021.00
##FFFFFF6.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0063E1
Deuteranopia (green-blind)
#0059D9
Tritanopia (blue-blind)
#176A8A
Achromatopsia (no color)
#5E5E5E

Design tokens & code

CSS
--color: #5e40dc;
/* rgb */ color: rgb(94, 64, 220);
/* oklch */ color: oklch(50.5% 0.223 283.8);
Tailwind
colors: {
  custom: {
    50: '#9878e8',
    500: '#5e40dc',
    950: '#000000',
  },
}
SCSS
$custom: #5e40dc;
$custom-light: #9878e8;
$custom-dark: #000000;
JSON
{
  "hex": "#5e40dc",
  "rgb": {
    "r": 94,
    "g": 64,
    "b": 220
  },
  "hsl": {
    "h": 251.538,
    "s": 69.027,
    "l": 55.686
  },
  "oklch": {
    "l": 0.5054,
    "c": 0.22306,
    "h": 283.8
  },
  "luminance": 0.11214
}

Semantic roles & 50–950 ramp

primary
#5E40DC
secondary
#D0DC9B
accent
#EC3CCA
background
#FAF7FE
surface
#F4EDFD
border
#CEC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5E40DC

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

Preview Lab → · Contrast checker → · Palette generator →

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