#5A40CA#5A40CA

#5A40CA is a mid, highly saturated violet. Relative luminance 0.101; OKLCH L 48.6% C 0.202 H 284.6°. Best body text is #FFFFFF at 6.95:1 contrast (WCAG AA passes).

Color values

HEX#5A40CA
RGBrgb(90, 64, 202)
HSLhsl(251, 57%, 52%)
HSVhsv(251, 68%, 79%)
CMYKcmyk(55.4%, 68.3%, 0%, 20.8%)
CIE-LABlab(38.03, 47.21, -67.98)
CIE-LCHlch(38.03, 82.76, 304.78°)
OKLaboklab(48.62% 0.0511 -0.1955)
OKLCHoklch(48.62% 0.202 284.6)
XYZxyz(16.7073, 10.1037, 56.9355)
Luminance0.1011 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A40CA #B0CA40
analogous
#406BCA #5A40CA #9F40CA
triadic
#5A40CA #CA5A40 #40CA5A
tetradic
#5A40CA #CA406B #B0CA40 #40CA9F
square
#5A40CA #CA406B #B0CA40 #40CA9F
split-complementary
#5A40CA #CA9F40 #6BCA40
monochromatic
#2E1F70 #422CA0 #5A40CA #8370D7 #ADA0E5

Accessibility & contrast

On white

6.95
#5A40CA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.02
#5A40CA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5A40CA
6.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A40CA#FFFFFF#000000##FFFFFF
##5A40CA1.006.953.026.95
#FFFFFF6.951.0021.001.00
#0000003.0221.001.0021.00
##FFFFFF6.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DCE
Deuteranopia (green-blind)
#0055C7
Tritanopia (blue-blind)
#256480
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #5a40ca;
/* rgb */ color: rgb(90, 64, 202);
/* oklch */ color: oklch(48.6% 0.202 284.6);
Tailwind
colors: {
  custom: {
    50: '#9477db',
    500: '#5a40ca',
    950: '#000000',
  },
}
SCSS
$custom: #5a40ca;
$custom-light: #9477db;
$custom-dark: #000000;
JSON
{
  "hex": "#5a40ca",
  "rgb": {
    "r": 90,
    "g": 64,
    "b": 202
  },
  "hsl": {
    "h": 251.304,
    "s": 56.557,
    "l": 52.157
  },
  "oklch": {
    "l": 0.48615,
    "c": 0.20207,
    "h": 284.6
  },
  "luminance": 0.10105
}

Semantic roles & 50–950 ramp

primary
#5A40CA
secondary
#C6D195
accent
#E048C3
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5A40CA

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

Preview Lab → · Contrast checker → · Palette generator →

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