#5A40BF#5A40BF

#5A40BF is a mid, vivid violet. Relative luminance 0.096; OKLCH L 47.7% C 0.189 H 286.2°. Best body text is #FFFFFF at 7.19:1 contrast (WCAG AA passes).

Color values

HEX#5A40BF
RGBrgb(90, 64, 191)
HSLhsl(252, 50%, 50%)
HSVhsv(252, 66%, 75%)
CMYKcmyk(52.9%, 66.5%, 0%, 25.1%)
CIE-LABlab(37.12, 43.93, -63.05)
CIE-LCHlch(37.12, 76.84, 304.87°)
OKLaboklab(47.68% 0.0527 -0.181)
OKLCHoklch(47.68% 0.189 286.2)
XYZxyz(15.4510, 9.6012, 50.3192)
Luminance0.0960 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5A40BF #A5BF40
analogous
#4066BF #5A40BF #9940BF
triadic
#5A40BF #BF5A40 #40BF5A
tetradic
#5A40BF #BF4066 #A5BF40 #40BF99
square
#5A40BF #BF4066 #A5BF40 #40BF99
split-complementary
#5A40BF #BF9940 #66BF40
monochromatic
#2F2163 #443191 #5A40BF #826ECE #A99CDE

Accessibility & contrast

On white

7.19
#5A40BF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.92
#5A40BF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5A40BF
7.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5A40BF#FFFFFF#000000##FFFFFF
##5A40BF1.007.192.927.19
#FFFFFF7.191.0021.001.00
#0000002.9221.001.0021.00
##FFFFFF7.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BC3
Deuteranopia (green-blind)
#0054BC
Tritanopia (blue-blind)
#31607A
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #5a40bf;
/* rgb */ color: rgb(90, 64, 191);
/* oklch */ color: oklch(47.7% 0.189 286.2);
Tailwind
colors: {
  custom: {
    50: '#9277d3',
    500: '#5a40bf',
    950: '#000000',
  },
}
SCSS
$custom: #5a40bf;
$custom-light: #9277d3;
$custom-dark: #000000;
JSON
{
  "hex": "#5a40bf",
  "rgb": {
    "r": 90,
    "g": 64,
    "b": 191
  },
  "hsl": {
    "h": 252.283,
    "s": 49.804,
    "l": 50
  },
  "oklch": {
    "l": 0.47677,
    "c": 0.18854,
    "h": 286.2
  },
  "luminance": 0.09602
}

Semantic roles & 50–950 ramp

primary
#5A40BF
secondary
#BECA91
accent
#D94EBD
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5A40BF

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

Preview Lab → · Contrast checker → · Palette generator →

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