#5C40C7#5C40C7

#5C40C7 is a mid, vivid violet. Relative luminance 0.101; OKLCH L 48.5% C 0.198 H 285.9°. Best body text is #FFFFFF at 6.97:1 contrast (WCAG AA passes).

Color values

HEX#5C40C7
RGBrgb(92, 64, 199)
HSLhsl(252, 55%, 52%)
HSVhsv(252, 68%, 78%)
CMYKcmyk(53.8%, 67.8%, 0%, 22%)
CIE-LABlab(37.96, 46.64, -66.34)
CIE-LCHlch(37.96, 81.09, 305.11°)
OKLaboklab(48.53% 0.0543 -0.1906)
OKLCHoklch(48.53% 0.198 285.9)
XYZxyz(16.5527, 10.0647, 55.0922)
Luminance0.1007 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5C40C7 #ABC740
analogous
#4068C7 #5C40C7 #9F40C7
triadic
#5C40C7 #C75C40 #40C75C
tetradic
#5C40C7 #C74068 #ABC740 #40C79F
square
#5C40C7 #C74068 #ABC740 #40C79F
split-complementary
#5C40C7 #C79F40 #68C740
monochromatic
#30206D #452E9C #5C40C7 #846FD5 #AD9FE3

Accessibility & contrast

On white

6.97
#5C40C7 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.01
#5C40C7 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5C40C7
6.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5C40C7#FFFFFF#000000##FFFFFF
##5C40C71.006.973.016.97
#FFFFFF6.971.0021.001.00
#0000003.0121.001.0021.00
##FFFFFF6.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DCB
Deuteranopia (green-blind)
#0055C4
Tritanopia (blue-blind)
#2F637E
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #5c40c7;
/* rgb */ color: rgb(92, 64, 199);
/* oklch */ color: oklch(48.5% 0.198 285.9);
Tailwind
colors: {
  custom: {
    50: '#9477d9',
    500: '#5c40c7',
    950: '#000000',
  },
}
SCSS
$custom: #5c40c7;
$custom-light: #9477d9;
$custom-dark: #000000;
JSON
{
  "hex": "#5c40c7",
  "rgb": {
    "r": 92,
    "g": 64,
    "b": 199
  },
  "hsl": {
    "h": 252.444,
    "s": 54.656,
    "l": 51.569
  },
  "oklch": {
    "l": 0.48531,
    "c": 0.19822,
    "h": 285.9
  },
  "luminance": 0.10066
}

Semantic roles & 50–950 ramp

primary
#5C40C7
secondary
#C3CF94
accent
#DE4ABF
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5C40C7

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

Preview Lab → · Contrast checker → · Palette generator →

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