#5A40C7#5A40C7

#5A40C7 is a mid, vivid violet. Relative luminance 0.100; OKLCH L 48.4% C 0.198 H 285.1°. Best body text is #FFFFFF at 7.02:1 contrast (WCAG AA passes).

Color values

HEX#5A40C7
RGBrgb(90, 64, 199)
HSLhsl(252, 55%, 52%)
HSVhsv(252, 68%, 78%)
CMYKcmyk(54.8%, 67.8%, 0%, 22%)
CIE-LABlab(37.78, 46.31, -66.64)
CIE-LCHlch(37.78, 81.16, 304.80°)
OKLaboklab(48.36% 0.0516 -0.1916)
OKLCHoklch(48.36% 0.198 285.1)
XYZxyz(16.3555, 9.9630, 55.0830)
Luminance0.0996 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A40C7 #ADC740
analogous
#406AC7 #5A40C7 #9E40C7
triadic
#5A40C7 #C75A40 #40C75A
tetradic
#5A40C7 #C7406A #ADC740 #40C79E
square
#5A40C7 #C7406A #ADC740 #40C79E
split-complementary
#5A40C7 #C79E40 #6AC740
monochromatic
#2F206D #432E9C #5A40C7 #836FD5 #AC9FE3

Accessibility & contrast

On white

7.02
#5A40C7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.99
#5A40C7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A40C7
7.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A40C7#FFFFFF#000000##FFFFFF
##5A40C71.007.022.997.02
#FFFFFF7.021.0021.001.00
#0000002.9921.001.0021.00
##FFFFFF7.021.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #5a40c7;
/* rgb */ color: rgb(90, 64, 199);
/* oklch */ color: oklch(48.4% 0.198 285.1);
Tailwind
colors: {
  custom: {
    50: '#9377d9',
    500: '#5a40c7',
    950: '#000000',
  },
}
SCSS
$custom: #5a40c7;
$custom-light: #9377d9;
$custom-dark: #000000;
JSON
{
  "hex": "#5a40c7",
  "rgb": {
    "r": 90,
    "g": 64,
    "b": 199
  },
  "hsl": {
    "h": 251.556,
    "s": 54.656,
    "l": 51.569
  },
  "oklch": {
    "l": 0.48356,
    "c": 0.19841,
    "h": 285.1
  },
  "luminance": 0.09964
}

Semantic roles & 50–950 ramp

primary
#5A40C7
secondary
#C4CF94
accent
#DE4AC1
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5A40C7

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

Preview Lab → · Contrast checker → · Palette generator →

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