#5940C8#5940C8

#5940C8 is a mid, vivid violet. Relative luminance 0.100; OKLCH L 48.4% C 0.200 H 284.5°. Best body text is #FFFFFF at 7.02:1 contrast (WCAG AA passes).

Color values

HEX#5940C8
RGBrgb(89, 64, 200)
HSLhsl(251, 55%, 52%)
HSVhsv(251, 68%, 78%)
CMYKcmyk(55.5%, 68%, 0%, 21.6%)
CIE-LABlab(37.77, 46.45, -67.24)
CIE-LCHlch(37.77, 81.72, 304.64°)
OKLaboklab(48.36% 0.05 -0.1934)
OKLCHoklch(48.36% 0.2 284.5)
XYZxyz(16.3754, 9.9598, 55.6919)
Luminance0.0996 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5940C8 #AFC840
analogous
#406BC8 #5940C8 #9D40C8
triadic
#5940C8 #C85940 #40C859
tetradic
#5940C8 #C8406B #AFC840 #40C89D
square
#5940C8 #C8406B #AFC840 #40C89D
split-complementary
#5940C8 #C89D40 #6BC840
monochromatic
#2E206E #422D9D #5940C8 #8270D6 #AC9FE3

Accessibility & contrast

On white

7.02
#5940C8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.99
#5940C8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5940C8
7.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5940C8#FFFFFF#000000##FFFFFF
##5940C81.007.022.997.02
#FFFFFF7.021.0021.001.00
#0000002.9921.001.0021.00
##FFFFFF7.021.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DCC
Deuteranopia (green-blind)
#0055C5
Tritanopia (blue-blind)
#25637F
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #5940c8;
/* rgb */ color: rgb(89, 64, 200);
/* oklch */ color: oklch(48.4% 0.200 284.5);
Tailwind
colors: {
  custom: {
    50: '#9377da',
    500: '#5940c8',
    950: '#000000',
  },
}
SCSS
$custom: #5940c8;
$custom-light: #9377da;
$custom-dark: #000000;
JSON
{
  "hex": "#5940c8",
  "rgb": {
    "r": 89,
    "g": 64,
    "b": 200
  },
  "hsl": {
    "h": 251.029,
    "s": 55.285,
    "l": 51.765
  },
  "oklch": {
    "l": 0.48356,
    "c": 0.19974,
    "h": 284.5
  },
  "luminance": 0.09961
}

Semantic roles & 50–950 ramp

primary
#5940C8
secondary
#C5D094
accent
#DF49C3
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5940C8

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

Preview Lab → · Contrast checker → · Palette generator →

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