#5D40CC#5D40CC

#5D40CC is a mid, highly saturated violet. Relative luminance 0.104; OKLCH L 49.0% C 0.204 H 285.6°. Best body text is #FFFFFF at 6.84:1 contrast (WCAG AA passes).

Color values

HEX#5D40CC
RGBrgb(93, 64, 204)
HSLhsl(252, 58%, 53%)
HSVhsv(252, 69%, 80%)
CMYKcmyk(54.4%, 68.6%, 0%, 20%)
CIE-LABlab(38.47, 48.28, -68.41)
CIE-LCHlch(38.47, 83.73, 305.21°)
OKLaboklab(49.05% 0.0549 -0.1967)
OKLCHoklch(49.05% 0.204 285.6)
XYZxyz(17.2434, 10.3526, 58.2047)
Luminance0.1035 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5D40CC #AFCC40
analogous
#4069CC #5D40CC #A340CC
triadic
#5D40CC #CC5D40 #40CC5D
tetradic
#5D40CC #CC4069 #AFCC40 #40CCA3
square
#5D40CC #CC4069 #AFCC40 #40CCA3
split-complementary
#5D40CC #CCA340 #69CC40
monochromatic
#301F73 #442CA3 #5D40CC #8670D9 #AFA1E6

Accessibility & contrast

On white

6.84
#5D40CC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.07
#5D40CC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5D40CC
6.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5D40CC#FFFFFF#000000##FFFFFF
##5D40CC1.006.843.076.84
#FFFFFF6.841.0021.001.00
#0000003.0721.001.0021.00
##FFFFFF6.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ED0
Deuteranopia (green-blind)
#0056C9
Tritanopia (blue-blind)
#2C6481
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5d40cc;
/* rgb */ color: rgb(93, 64, 204);
/* oklch */ color: oklch(49.0% 0.204 285.6);
Tailwind
colors: {
  custom: {
    50: '#9577dd',
    500: '#5d40cc',
    950: '#000000',
  },
}
SCSS
$custom: #5d40cc;
$custom-light: #9577dd;
$custom-dark: #000000;
JSON
{
  "hex": "#5d40cc",
  "rgb": {
    "r": 93,
    "g": 64,
    "b": 204
  },
  "hsl": {
    "h": 252.429,
    "s": 57.851,
    "l": 52.549
  },
  "oklch": {
    "l": 0.49048,
    "c": 0.20419,
    "h": 285.6
  },
  "luminance": 0.10354
}

Semantic roles & 50–950 ramp

primary
#5D40CC
secondary
#C6D295
accent
#E147C1
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5D40CC

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

Preview Lab → · Contrast checker → · Palette generator →

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