#5D40E1#5D40E1

#5D40E1 is a mid, highly saturated violet. Relative luminance 0.114; OKLCH L 50.9% C 0.229 H 282.9°. Best body text is #FFFFFF at 6.39:1 contrast (WCAG AA passes).

Color values

HEX#5D40E1
RGBrgb(93, 64, 225)
HSLhsl(251, 73%, 57%)
HSVhsv(251, 72%, 88%)
CMYKcmyk(58.7%, 71.6%, 0%, 11.8%)
CIE-LABlab(40.29, 54.42, -77.49)
CIE-LCHlch(40.29, 94.69, 305.08°)
OKLaboklab(50.91% 0.051 -0.2233)
OKLCHoklch(50.91% 0.229 282.9)
XYZxyz(19.9340, 11.4289, 72.3751)
Luminance0.1143 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5D40E1 #C4E140
analogous
#4074E1 #5D40E1 #AD40E1
triadic
#5D40E1 #E15D40 #40E15D
tetradic
#5D40E1 #E14074 #C4E140 #40E1AD
square
#5D40E1 #E14074 #C4E140 #40E1AD
split-complementary
#5D40E1 #E1AD40 #74E140
monochromatic
#2C1790 #3D1FC5 #5D40E1 #8A75E9 #B7AAF2

Accessibility & contrast

On white

6.39
#5D40E1 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.29
#5D40E1 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5D40E1
6.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5D40E1#FFFFFF#000000##FFFFFF
##5D40E11.006.393.296.39
#FFFFFF6.391.0021.001.00
#0000003.2921.001.0021.00
##FFFFFF6.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0064E6
Deuteranopia (green-blind)
#0059DE
Tritanopia (blue-blind)
#006C8D
Achromatopsia (no color)
#5F5F5F

Design tokens & code

CSS
--color: #5d40e1;
/* rgb */ color: rgb(93, 64, 225);
/* oklch */ color: oklch(50.9% 0.229 282.9);
Tailwind
colors: {
  custom: {
    50: '#9978ec',
    500: '#5d40e1',
    950: '#000000',
  },
}
SCSS
$custom: #5d40e1;
$custom-light: #9978ec;
$custom-dark: #000000;
JSON
{
  "hex": "#5d40e1",
  "rgb": {
    "r": 93,
    "g": 64,
    "b": 225
  },
  "hsl": {
    "h": 250.807,
    "s": 72.851,
    "l": 56.667
  },
  "oklch": {
    "l": 0.50908,
    "c": 0.22903,
    "h": 282.9
  },
  "luminance": 0.1143
}

Semantic roles & 50–950 ramp

primary
#5D40E1
secondary
#D3DF9D
accent
#F038CF
background
#FAF7FE
surface
#F4EDFD
border
#CEC8D5
text
#0F0916
muted
#7F7B84

Preview Lab

Preview with #5D40E1

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

Preview Lab → · Contrast checker → · Palette generator →

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