#5940AF#5940AF

#5940AF is a mid, vivid violet. Relative luminance 0.089; OKLCH L 46.3% C 0.168 H 288.4°. Best body text is #FFFFFF at 7.56:1 contrast (WCAG AA passes).

Color values

HEX#5940AF
RGBrgb(89, 64, 175)
HSLhsl(254, 46%, 47%)
HSVhsv(254, 63%, 69%)
CMYKcmyk(49.1%, 63.4%, 0%, 31.4%)
CIE-LABlab(35.76, 38.97, -55.81)
CIE-LCHlch(35.76, 68.07, 304.93°)
OKLaboklab(46.28% 0.0531 -0.1598)
OKLCHoklch(46.28% 0.168 288.4)
XYZxyz(13.6888, 8.8852, 41.5429)
Luminance0.0889 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5940AF #96AF40
analogous
#405EAF #5940AF #9140AF
triadic
#5940AF #AF5940 #40AF59
tetradic
#5940AF #AF405E #96AF40 #40AF91
square
#5940AF #AF405E #96AF40 #40AF91
split-complementary
#5940AF #AF9140 #5EAF40
monochromatic
#2B1F55 #423082 #5940AF #7B65C7 #A292D7

Accessibility & contrast

On white

7.56
#5940AF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.78
#5940AF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5940AF
7.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5940AF#FFFFFF#000000##FFFFFF
##5940AF1.007.562.787.56
#FFFFFF7.561.0021.001.00
#0000002.7821.001.0021.00
##FFFFFF7.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057B3
Deuteranopia (green-blind)
#0051AD
Tritanopia (blue-blind)
#3C5A71
Achromatopsia (no color)
#545454

Design tokens & code

CSS
--color: #5940af;
/* rgb */ color: rgb(89, 64, 175);
/* oklch */ color: oklch(46.3% 0.168 288.4);
Tailwind
colors: {
  custom: {
    50: '#8f76c8',
    500: '#5940af',
    950: '#000000',
  },
}
SCSS
$custom: #5940af;
$custom-light: #8f76c8;
$custom-dark: #000000;
JSON
{
  "hex": "#5940af",
  "rgb": {
    "r": 89,
    "g": 64,
    "b": 175
  },
  "hsl": {
    "h": 253.514,
    "s": 46.444,
    "l": 46.863
  },
  "oklch": {
    "l": 0.4628,
    "c": 0.1684,
    "h": 288.4
  },
  "luminance": 0.08886
}

Semantic roles & 50–950 ramp

primary
#5940AF
secondary
#B5C388
accent
#D652B8
background
#F9F7FC
surface
#F1EDF8
border
#CBC8D1
text
#0D0813
muted
#7E7B82

Preview Lab

Preview with #5940AF

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

Preview Lab → · Contrast checker → · Palette generator →

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