#5E40D6#5E40D6

#5E40D6 is a mid, highly saturated violet. Relative luminance 0.109; OKLCH L 50.0% C 0.216 H 284.6°. Best body text is #FFFFFF at 6.60:1 contrast (WCAG AA passes).

Color values

HEX#5E40D6
RGBrgb(94, 64, 214)
HSLhsl(252, 65%, 55%)
HSVhsv(252, 70%, 84%)
CMYKcmyk(56.1%, 70.1%, 0%, 16.1%)
CIE-LABlab(39.41, 51.36, -72.63)
CIE-LCHlch(39.41, 88.95, 305.26°)
OKLaboklab(50.01% 0.0545 -0.209)
OKLCHoklch(50.01% 0.216 284.6)
XYZxyz(18.5834, 10.9004, 64.7300)
Luminance0.1090 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5E40D6 #B8D640
analogous
#406DD6 #5E40D6 #A940D6
triadic
#5E40D6 #D65E40 #40D65E
tetradic
#5E40D6 #D6406D #B8D640 #40D6A9
square
#5E40D6 #D6406D #B8D640 #40D6A9
split-complementary
#5E40D6 #D6A940 #6DD640
monochromatic
#301B80 #4226B2 #5E40D6 #8872E1 #B3A5EC

Accessibility & contrast

On white

6.60
#5E40D6 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.18
#5E40D6 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5E40D6
6.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5E40D6#FFFFFF#000000##FFFFFF
##5E40D61.006.603.186.60
#FFFFFF6.601.0021.001.00
#0000003.1821.001.0021.00
##FFFFFF6.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0061DA
Deuteranopia (green-blind)
#0058D3
Tritanopia (blue-blind)
#226886
Achromatopsia (no color)
#5D5D5D

Design tokens & code

CSS
--color: #5e40d6;
/* rgb */ color: rgb(94, 64, 214);
/* oklch */ color: oklch(50.0% 0.216 284.6);
Tailwind
colors: {
  custom: {
    50: '#9877e4',
    500: '#5e40d6',
    950: '#000000',
  },
}
SCSS
$custom: #5e40d6;
$custom-light: #9877e4;
$custom-dark: #000000;
JSON
{
  "hex": "#5e40d6",
  "rgb": {
    "r": 94,
    "g": 64,
    "b": 214
  },
  "hsl": {
    "h": 252,
    "s": 64.655,
    "l": 54.51
  },
  "oklch": {
    "l": 0.50007,
    "c": 0.21601,
    "h": 284.6
  },
  "luminance": 0.10902
}

Semantic roles & 50–950 ramp

primary
#5E40D6
secondary
#CCD999
accent
#E840C6
background
#FAF7FE
surface
#F3EDFC
border
#CDC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5E40D6

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

Preview Lab → · Contrast checker → · Palette generator →

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