#5D40D2#5D40D2

#5D40D2 is a mid, highly saturated violet. Relative luminance 0.106; OKLCH L 49.6% C 0.211 H 284.8°. Best body text is #FFFFFF at 6.71:1 contrast (WCAG AA passes).

Color values

HEX#5D40D2
RGBrgb(93, 64, 210)
HSLhsl(252, 62%, 54%)
HSVhsv(252, 70%, 82%)
CMYKcmyk(55.7%, 69.5%, 0%, 17.6%)
CIE-LABlab(38.98, 50.04, -71.04)
CIE-LCHlch(38.98, 86.89, 305.16°)
OKLaboklab(49.57% 0.0539 -0.2044)
OKLCHoklch(49.57% 0.211 284.8)
XYZxyz(17.9769, 10.6460, 62.0679)
Luminance0.1065 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5D40D2 #B5D240
analogous
#406CD2 #5D40D2 #A640D2
triadic
#5D40D2 #D25D40 #40D25D
tetradic
#5D40D2 #D2406C #B5D240 #40D2A6
square
#5D40D2 #D2406C #B5D240 #40D2A6
split-complementary
#5D40D2 #D2A640 #6CD240
monochromatic
#301D7B #4329AC #5D40D2 #8772DE #B1A3E9

Accessibility & contrast

On white

6.71
#5D40D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.13
#5D40D2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5D40D2
6.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5D40D2#FFFFFF#000000##FFFFFF
##5D40D21.006.713.136.71
#FFFFFF6.711.0021.001.00
#0000003.1321.001.0021.00
##FFFFFF6.711.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5d40d2;
/* rgb */ color: rgb(93, 64, 210);
/* oklch */ color: oklch(49.6% 0.211 284.8);
Tailwind
colors: {
  custom: {
    50: '#9677e1',
    500: '#5d40d2',
    950: '#000000',
  },
}
SCSS
$custom: #5d40d2;
$custom-light: #9677e1;
$custom-dark: #000000;
JSON
{
  "hex": "#5d40d2",
  "rgb": {
    "r": 93,
    "g": 64,
    "b": 210
  },
  "hsl": {
    "h": 251.918,
    "s": 61.864,
    "l": 53.725
  },
  "oklch": {
    "l": 0.49569,
    "c": 0.21137,
    "h": 284.8
  },
  "luminance": 0.10647
}

Semantic roles & 50–950 ramp

primary
#5D40D2
secondary
#CAD698
accent
#E543C5
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0F0915
muted
#7E7B83

Preview Lab

Preview with #5D40D2

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

Preview Lab → · Contrast checker → · Palette generator →

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