#5E40D2#5E40D2

#5E40D2 is a mid, highly saturated violet. Relative luminance 0.107; OKLCH L 49.7% C 0.211 H 285.2°. Best body text is #FFFFFF at 6.69:1 contrast (WCAG AA passes).

Color values

HEX#5E40D2
RGBrgb(94, 64, 210)
HSLhsl(252, 62%, 54%)
HSVhsv(252, 70%, 82%)
CMYKcmyk(55.2%, 69.5%, 0%, 17.6%)
CIE-LABlab(39.07, 50.19, -70.89)
CIE-LCHlch(39.07, 86.86, 305.30°)
OKLaboklab(49.66% 0.0552 -0.2039)
OKLCHoklch(49.66% 0.211 285.2)
XYZxyz(18.0788, 10.6986, 62.0727)
Luminance0.1070 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5E40D2 #B4D240
analogous
#406BD2 #5E40D2 #A740D2
triadic
#5E40D2 #D25E40 #40D25E
tetradic
#5E40D2 #D2406B #B4D240 #40D2A7
square
#5E40D2 #D2406B #B4D240 #40D2A7
split-complementary
#5E40D2 #D2A740 #6BD240
monochromatic
#301D7B #4429AC #5E40D2 #8872DE #B2A3E9

Accessibility & contrast

On white

6.69
#5E40D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.14
#5E40D2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5E40D2
6.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5E40D2#FFFFFF#000000##FFFFFF
##5E40D21.006.693.146.69
#FFFFFF6.691.0021.001.00
#0000003.1421.001.0021.00
##FFFFFF6.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0060D6
Deuteranopia (green-blind)
#0057CF
Tritanopia (blue-blind)
#286684
Achromatopsia (no color)
#5C5C5C

Design tokens & code

CSS
--color: #5e40d2;
/* rgb */ color: rgb(94, 64, 210);
/* oklch */ color: oklch(49.7% 0.211 285.2);
Tailwind
colors: {
  custom: {
    50: '#9777e1',
    500: '#5e40d2',
    950: '#000000',
  },
}
SCSS
$custom: #5e40d2;
$custom-light: #9777e1;
$custom-dark: #000000;
JSON
{
  "hex": "#5e40d2",
  "rgb": {
    "r": 94,
    "g": 64,
    "b": 210
  },
  "hsl": {
    "h": 252.329,
    "s": 61.864,
    "l": 53.725
  },
  "oklch": {
    "l": 0.49656,
    "c": 0.21127,
    "h": 285.2
  },
  "luminance": 0.107
}

Semantic roles & 50–950 ramp

primary
#5E40D2
secondary
#C9D698
accent
#E543C4
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0F0915
muted
#7E7B83

Preview Lab

Preview with #5E40D2

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

Preview Lab → · Contrast checker → · Palette generator →

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