#5A40C8#5A40C8

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

Color values

HEX#5A40C8
RGBrgb(90, 64, 200)
HSLhsl(251, 55%, 52%)
HSVhsv(251, 68%, 78%)
CMYKcmyk(55%, 68%, 0%, 21.6%)
CIE-LABlab(37.86, 46.61, -67.09)
CIE-LCHlch(37.86, 81.69, 304.79°)
OKLaboklab(48.44% 0.0514 -0.1929)
OKLCHoklch(48.44% 0.2 284.9)
XYZxyz(16.4720, 10.0096, 55.6965)
Luminance0.1001 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A40C8 #AEC840
analogous
#406AC8 #5A40C8 #9E40C8
triadic
#5A40C8 #C85A40 #40C85A
tetradic
#5A40C8 #C8406A #AEC840 #40C89E
square
#5A40C8 #C8406A #AEC840 #40C89E
split-complementary
#5A40C8 #C89E40 #6AC840
monochromatic
#2F206E #432D9D #5A40C8 #8370D6 #AC9FE3

Accessibility & contrast

On white

6.99
#5A40C8 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.00
#5A40C8 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5A40C8
6.99:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A40C8#FFFFFF#000000##FFFFFF
##5A40C81.006.993.006.99
#FFFFFF6.991.0021.001.00
#0000003.0021.001.0021.00
##FFFFFF6.991.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DCC
Deuteranopia (green-blind)
#0055C5
Tritanopia (blue-blind)
#28637F
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #5a40c8;
/* rgb */ color: rgb(90, 64, 200);
/* oklch */ color: oklch(48.4% 0.200 284.9);
Tailwind
colors: {
  custom: {
    50: '#9377da',
    500: '#5a40c8',
    950: '#000000',
  },
}
SCSS
$custom: #5a40c8;
$custom-light: #9377da;
$custom-dark: #000000;
JSON
{
  "hex": "#5a40c8",
  "rgb": {
    "r": 90,
    "g": 64,
    "b": 200
  },
  "hsl": {
    "h": 251.471,
    "s": 55.285,
    "l": 51.765
  },
  "oklch": {
    "l": 0.48442,
    "c": 0.19963,
    "h": 284.9
  },
  "luminance": 0.10011
}

Semantic roles & 50–950 ramp

primary
#5A40C8
secondary
#C4D094
accent
#DF49C2
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5A40C8

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

Preview Lab → · Contrast checker → · Palette generator →

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