#5940B2#5940B2

#5940B2 is a mid, vivid violet. Relative luminance 0.090; OKLCH L 46.5% C 0.172 H 287.9°. Best body text is #FFFFFF at 7.50:1 contrast (WCAG AA passes).

Color values

HEX#5940B2
RGBrgb(89, 64, 178)
HSLhsl(253, 47%, 47%)
HSVhsv(253, 64%, 70%)
CMYKcmyk(50%, 64%, 0%, 30.2%)
CIE-LABlab(35.99, 39.87, -57.22)
CIE-LCHlch(35.99, 69.74, 304.87°)
OKLaboklab(46.52% 0.0528 -0.1639)
OKLCHoklch(46.52% 0.172 287.9)
XYZxyz(13.9868, 9.0044, 43.1119)
Luminance0.0901 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5940B2 #99B240
analogous
#4060B2 #5940B2 #9240B2
triadic
#5940B2 #B25940 #40B259
tetradic
#5940B2 #B24060 #99B240 #40B292
square
#5940B2 #B24060 #99B240 #40B292
split-complementary
#5940B2 #B29240 #60B240
monochromatic
#2C2058 #423085 #5940B2 #7C67C8 #A394D8

Accessibility & contrast

On white

7.50
#5940B2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.80
#5940B2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5940B2
7.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5940B2#FFFFFF#000000##FFFFFF
##5940B21.007.502.807.50
#FFFFFF7.501.0021.001.00
#0000002.8021.001.0021.00
##FFFFFF7.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057B6
Deuteranopia (green-blind)
#0052B0
Tritanopia (blue-blind)
#3A5B73
Achromatopsia (no color)
#555555

Design tokens & code

CSS
--color: #5940b2;
/* rgb */ color: rgb(89, 64, 178);
/* oklch */ color: oklch(46.5% 0.172 287.9);
Tailwind
colors: {
  custom: {
    50: '#8f76ca',
    500: '#5940b2',
    950: '#000000',
  },
}
SCSS
$custom: #5940b2;
$custom-light: #8f76ca;
$custom-dark: #000000;
JSON
{
  "hex": "#5940b2",
  "rgb": {
    "r": 89,
    "g": 64,
    "b": 178
  },
  "hsl": {
    "h": 253.158,
    "s": 47.107,
    "l": 47.451
  },
  "oklch": {
    "l": 0.4652,
    "c": 0.17224,
    "h": 287.9
  },
  "luminance": 0.09005
}

Semantic roles & 50–950 ramp

primary
#5940B2
secondary
#B7C48A
accent
#D751B9
background
#F9F7FC
surface
#F2EDF8
border
#CCC8D1
text
#0D0813
muted
#7E7B82

Preview Lab

Preview with #5940B2

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

Preview Lab → · Contrast checker → · Palette generator →

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