#5940C7#5940C7

#5940C7 is a mid, vivid violet. Relative luminance 0.099; OKLCH L 48.3% C 0.199 H 284.6°. Best body text is #FFFFFF at 7.04:1 contrast (WCAG AA passes).

Color values

HEX#5940C7
RGBrgb(89, 64, 199)
HSLhsl(251, 55%, 52%)
HSVhsv(251, 68%, 78%)
CMYKcmyk(55.3%, 67.8%, 0%, 22%)
CIE-LABlab(37.69, 46.15, -66.79)
CIE-LCHlch(37.69, 81.19, 304.64°)
OKLaboklab(48.27% 0.0502 -0.1921)
OKLCHoklch(48.27% 0.199 284.6)
XYZxyz(16.2589, 9.9132, 55.0785)
Luminance0.0991 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5940C7 #AEC740
analogous
#406BC7 #5940C7 #9D40C7
triadic
#5940C7 #C75940 #40C759
tetradic
#5940C7 #C7406B #AEC740 #40C79D
square
#5940C7 #C7406B #AEC740 #40C79D
split-complementary
#5940C7 #C79D40 #6BC740
monochromatic
#2E206D #422E9C #5940C7 #826FD5 #AB9FE3

Accessibility & contrast

On white

7.04
#5940C7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.98
#5940C7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5940C7
7.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5940C7#FFFFFF#000000##FFFFFF
##5940C71.007.042.987.04
#FFFFFF7.041.0021.001.00
#0000002.9821.001.0021.00
##FFFFFF7.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DCB
Deuteranopia (green-blind)
#0054C4
Tritanopia (blue-blind)
#26637E
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #5940c7;
/* rgb */ color: rgb(89, 64, 199);
/* oklch */ color: oklch(48.3% 0.199 284.6);
Tailwind
colors: {
  custom: {
    50: '#9277d9',
    500: '#5940c7',
    950: '#000000',
  },
}
SCSS
$custom: #5940c7;
$custom-light: #9277d9;
$custom-dark: #000000;
JSON
{
  "hex": "#5940c7",
  "rgb": {
    "r": 89,
    "g": 64,
    "b": 199
  },
  "hsl": {
    "h": 251.111,
    "s": 54.656,
    "l": 51.569
  },
  "oklch": {
    "l": 0.48269,
    "c": 0.19852,
    "h": 284.6
  },
  "luminance": 0.09914
}

Semantic roles & 50–950 ramp

primary
#5940C7
secondary
#C4CF94
accent
#DE4AC3
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5940C7

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

Preview Lab → · Contrast checker → · Palette generator →

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