#5940BF#5940BF

#5940BF is a mid, vivid violet. Relative luminance 0.096; OKLCH L 47.6% C 0.189 H 285.8°. Best body text is #FFFFFF at 7.22:1 contrast (WCAG AA passes).

Color values

HEX#5940BF
RGBrgb(89, 64, 191)
HSLhsl(252, 50%, 50%)
HSVhsv(252, 66%, 75%)
CMYKcmyk(53.4%, 66.5%, 0%, 25.1%)
CIE-LABlab(37.02, 43.76, -63.20)
CIE-LCHlch(37.02, 76.87, 304.70°)
OKLaboklab(47.59% 0.0513 -0.1815)
OKLCHoklch(47.59% 0.189 285.8)
XYZxyz(15.3544, 9.5514, 50.3147)
Luminance0.0955 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5940BF #A6BF40
analogous
#4067BF #5940BF #9840BF
triadic
#5940BF #BF5940 #40BF59
tetradic
#5940BF #BF4067 #A6BF40 #40BF98
square
#5940BF #BF4067 #A6BF40 #40BF98
split-complementary
#5940BF #BF9840 #67BF40
monochromatic
#2E2163 #443191 #5940BF #816ECE #A99CDE

Accessibility & contrast

On white

7.22
#5940BF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.91
#5940BF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5940BF
7.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5940BF#FFFFFF#000000##FFFFFF
##5940BF1.007.222.917.22
#FFFFFF7.221.0021.001.00
#0000002.9121.001.0021.00
##FFFFFF7.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BC3
Deuteranopia (green-blind)
#0053BC
Tritanopia (blue-blind)
#2F607A
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #5940bf;
/* rgb */ color: rgb(89, 64, 191);
/* oklch */ color: oklch(47.6% 0.189 285.8);
Tailwind
colors: {
  custom: {
    50: '#9176d3',
    500: '#5940bf',
    950: '#000000',
  },
}
SCSS
$custom: #5940bf;
$custom-light: #9176d3;
$custom-dark: #000000;
JSON
{
  "hex": "#5940bf",
  "rgb": {
    "r": 89,
    "g": 64,
    "b": 191
  },
  "hsl": {
    "h": 251.811,
    "s": 49.804,
    "l": 50
  },
  "oklch": {
    "l": 0.47589,
    "c": 0.18864,
    "h": 285.8
  },
  "luminance": 0.09552
}

Semantic roles & 50–950 ramp

primary
#5940BF
secondary
#BFCA91
accent
#D94EBE
background
#F9F7FD
surface
#F2EDFA
border
#CCC8D3
text
#0E0914
muted
#7E7B83

Preview Lab

Preview with #5940BF

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

Preview Lab → · Contrast checker → · Palette generator →

#5940BF Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva