#5A40CF#5A40CF

#5A40CF is a mid, highly saturated violet. Relative luminance 0.103; OKLCH L 49.0% C 0.208 H 284.0°. Best body text is #FFFFFF at 6.84:1 contrast (WCAG AA passes).

Color values

HEX#5A40CF
RGBrgb(90, 64, 207)
HSLhsl(251, 60%, 53%)
HSVhsv(251, 69%, 81%)
CMYKcmyk(56.5%, 69.1%, 0%, 18.8%)
CIE-LABlab(38.45, 48.70, -70.18)
CIE-LCHlch(38.45, 85.42, 304.76°)
OKLaboklab(49.05% 0.0503 -0.202)
OKLCHoklch(49.05% 0.208 284)
XYZxyz(17.3089, 10.3444, 60.1040)
Luminance0.1035 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A40CF #B5CF40
analogous
#406DCF #5A40CF #A140CF
triadic
#5A40CF #CF5A40 #40CF5A
tetradic
#5A40CF #CF406D #B5CF40 #40CFA1
square
#5A40CF #CF406D #B5CF40 #40CFA1
split-complementary
#5A40CF #CFA140 #6DCF40
monochromatic
#2E1E77 #412AA8 #5A40CF #8471DB #AFA2E8

Accessibility & contrast

On white

6.84
#5A40CF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.07
#5A40CF on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5A40CF
6.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A40CF#FFFFFF#000000##FFFFFF
##5A40CF1.006.843.076.84
#FFFFFF6.841.0021.001.00
#0000003.0721.001.0021.00
##FFFFFF6.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FD3
Deuteranopia (green-blind)
#0056CC
Tritanopia (blue-blind)
#1E6683
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5a40cf;
/* rgb */ color: rgb(90, 64, 207);
/* oklch */ color: oklch(49.0% 0.208 284.0);
Tailwind
colors: {
  custom: {
    50: '#9477df',
    500: '#5a40cf',
    950: '#000000',
  },
}
SCSS
$custom: #5a40cf;
$custom-light: #9477df;
$custom-dark: #000000;
JSON
{
  "hex": "#5a40cf",
  "rgb": {
    "r": 90,
    "g": 64,
    "b": 207
  },
  "hsl": {
    "h": 250.909,
    "s": 59.833,
    "l": 53.137
  },
  "oklch": {
    "l": 0.4905,
    "c": 0.20812,
    "h": 284
  },
  "luminance": 0.10345
}

Semantic roles & 50–950 ramp

primary
#5A40CF
secondary
#C9D497
accent
#E345C6
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5A40CF

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

Preview Lab → · Contrast checker → · Palette generator →

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