#5A40D0#5A40D0

#5A40D0 is a mid, highly saturated violet. Relative luminance 0.104; OKLCH L 49.1% C 0.209 H 283.8°. Best body text is #FFFFFF at 6.82:1 contrast (WCAG AA passes).

Color values

HEX#5A40D0
RGBrgb(90, 64, 208)
HSLhsl(251, 61%, 53%)
HSVhsv(251, 69%, 82%)
CMYKcmyk(56.7%, 69.2%, 0%, 18.4%)
CIE-LABlab(38.54, 48.99, -70.62)
CIE-LCHlch(38.54, 85.95, 304.75°)
OKLaboklab(49.14% 0.0501 -0.2032)
OKLCHoklch(49.14% 0.209 283.8)
XYZxyz(17.4315, 10.3934, 60.7499)
Luminance0.1040 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A40D0 #B6D040
analogous
#406ED0 #5A40D0 #A240D0
triadic
#5A40D0 #D05A40 #40D05A
tetradic
#5A40D0 #D0406E #B6D040 #40D0A2
square
#5A40D0 #D0406E #B6D040 #40D0A2
split-complementary
#5A40D0 #D0A240 #6ED040
monochromatic
#2E1E78 #412AA9 #5A40D0 #8471DC #AFA2E8

Accessibility & contrast

On white

6.82
#5A40D0 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.08
#5A40D0 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5A40D0
6.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A40D0#FFFFFF#000000##FFFFFF
##5A40D01.006.823.086.82
#FFFFFF6.821.0021.001.00
#0000003.0821.001.0021.00
##FFFFFF6.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FD4
Deuteranopia (green-blind)
#0056CD
Tritanopia (blue-blind)
#1C6683
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5a40d0;
/* rgb */ color: rgb(90, 64, 208);
/* oklch */ color: oklch(49.1% 0.209 283.8);
Tailwind
colors: {
  custom: {
    50: '#9477e0',
    500: '#5a40d0',
    950: '#000000',
  },
}
SCSS
$custom: #5a40d0;
$custom-light: #9477e0;
$custom-dark: #000000;
JSON
{
  "hex": "#5a40d0",
  "rgb": {
    "r": 90,
    "g": 64,
    "b": 208
  },
  "hsl": {
    "h": 250.833,
    "s": 60.504,
    "l": 53.333
  },
  "oklch": {
    "l": 0.49138,
    "c": 0.20932,
    "h": 283.8
  },
  "luminance": 0.10395
}

Semantic roles & 50–950 ramp

primary
#5A40D0
secondary
#CAD597
accent
#E444C7
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5A40D0

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

Preview Lab → · Contrast checker → · Palette generator →

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