#5A40CC#5A40CC

#5A40CC is a mid, highly saturated violet. Relative luminance 0.102; OKLCH L 48.8% C 0.204 H 284.4°. Best body text is #FFFFFF at 6.91:1 contrast (WCAG AA passes).

Color values

HEX#5A40CC
RGBrgb(90, 64, 204)
HSLhsl(251, 58%, 53%)
HSVhsv(251, 69%, 80%)
CMYKcmyk(55.9%, 68.6%, 0%, 20%)
CIE-LABlab(38.20, 47.80, -68.86)
CIE-LCHlch(38.20, 83.83, 304.77°)
OKLaboklab(48.79% 0.0508 -0.1981)
OKLCHoklch(48.79% 0.204 284.4)
XYZxyz(16.9456, 10.1991, 58.1907)
Luminance0.1020 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A40CC #B2CC40
analogous
#406CCC #5A40CC #A040CC
triadic
#5A40CC #CC5A40 #40CC5A
tetradic
#5A40CC #CC406C #B2CC40 #40CCA0
square
#5A40CC #CC406C #B2CC40 #40CCA0
split-complementary
#5A40CC #CCA040 #6CCC40
monochromatic
#2E1F73 #422CA3 #5A40CC #8470D9 #ADA1E6

Accessibility & contrast

On white

6.91
#5A40CC on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.04
#5A40CC on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5A40CC
6.91:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A40CC#FFFFFF#000000##FFFFFF
##5A40CC1.006.913.046.91
#FFFFFF6.911.0021.001.00
#0000003.0421.001.0021.00
##FFFFFF6.911.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ED0
Deuteranopia (green-blind)
#0055C9
Tritanopia (blue-blind)
#236581
Achromatopsia (no color)
#5A5A5A

Design tokens & code

CSS
--color: #5a40cc;
/* rgb */ color: rgb(90, 64, 204);
/* oklch */ color: oklch(48.8% 0.204 284.4);
Tailwind
colors: {
  custom: {
    50: '#9477dd',
    500: '#5a40cc',
    950: '#000000',
  },
}
SCSS
$custom: #5a40cc;
$custom-light: #9477dd;
$custom-dark: #000000;
JSON
{
  "hex": "#5a40cc",
  "rgb": {
    "r": 90,
    "g": 64,
    "b": 204
  },
  "hsl": {
    "h": 251.143,
    "s": 57.851,
    "l": 52.549
  },
  "oklch": {
    "l": 0.48788,
    "c": 0.20449,
    "h": 284.4
  },
  "luminance": 0.102
}

Semantic roles & 50–950 ramp

primary
#5A40CC
secondary
#C7D295
accent
#E147C4
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5A40CC

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

Preview Lab → · Contrast checker → · Palette generator →

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