#5940D2#5940D2

#5940D2 is a mid, highly saturated violet. Relative luminance 0.104; OKLCH L 49.2% C 0.212 H 283.2°. Best body text is #FFFFFF at 6.80:1 contrast (WCAG AA passes).

Color values

HEX#5940D2
RGBrgb(89, 64, 210)
HSLhsl(250, 62%, 54%)
HSVhsv(250, 70%, 82%)
CMYKcmyk(57.6%, 69.5%, 0%, 17.6%)
CIE-LABlab(38.63, 49.44, -71.63)
CIE-LCHlch(38.63, 87.04, 304.61°)
OKLaboklab(49.23% 0.0484 -0.2062)
OKLCHoklch(49.23% 0.212 283.2)
XYZxyz(17.5825, 10.4427, 62.0494)
Luminance0.1044 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5940D2 #B9D240
analogous
#4070D2 #5940D2 #A240D2
triadic
#5940D2 #D25940 #40D259
tetradic
#5940D2 #D24070 #B9D240 #40D2A2
square
#5940D2 #D24070 #B9D240 #40D2A2
split-complementary
#5940D2 #D2A240 #70D240
monochromatic
#2D1D7B #3F29AC #5940D2 #8472DE #AFA3E9

Accessibility & contrast

On white

6.80
#5940D2 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.09
#5940D2 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5940D2
6.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5940D2#FFFFFF#000000##FFFFFF
##5940D21.006.803.096.80
#FFFFFF6.801.0021.001.00
#0000003.0921.001.0021.00
##FFFFFF6.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FD6
Deuteranopia (green-blind)
#0056CF
Tritanopia (blue-blind)
#126784
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #5940d2;
/* rgb */ color: rgb(89, 64, 210);
/* oklch */ color: oklch(49.2% 0.212 283.2);
Tailwind
colors: {
  custom: {
    50: '#9477e1',
    500: '#5940d2',
    950: '#000000',
  },
}
SCSS
$custom: #5940d2;
$custom-light: #9477e1;
$custom-dark: #000000;
JSON
{
  "hex": "#5940d2",
  "rgb": {
    "r": 89,
    "g": 64,
    "b": 210
  },
  "hsl": {
    "h": 250.274,
    "s": 61.864,
    "l": 53.725
  },
  "oklch": {
    "l": 0.49231,
    "c": 0.21185,
    "h": 283.2
  },
  "luminance": 0.10444
}

Semantic roles & 50–950 ramp

primary
#5940D2
secondary
#CBD698
accent
#E543C9
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5940D2

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

Preview Lab → · Contrast checker → · Palette generator →

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