#5940AB#5940AB

#5940AB is a mid, vivid violet. Relative luminance 0.087; OKLCH L 46.0% C 0.163 H 289.1°. Best body text is #FFFFFF at 7.65:1 contrast (WCAG AA passes).

Color values

HEX#5940AB
RGBrgb(89, 64, 171)
HSLhsl(254, 46%, 46%)
HSVhsv(254, 63%, 67%)
CMYKcmyk(48%, 62.6%, 0%, 32.9%)
CIE-LABlab(35.46, 37.78, -53.92)
CIE-LCHlch(35.46, 65.84, 305.02°)
OKLaboklab(45.96% 0.0534 -0.1542)
OKLCHoklch(45.96% 0.163 289.1)
XYZxyz(13.3018, 8.7304, 39.5044)
Luminance0.0873 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5940AB #92AB40
analogous
#405CAB #5940AB #8E40AB
triadic
#5940AB #AB5940 #40AB59
tetradic
#5940AB #AB405C #92AB40 #40AB8E
square
#5940AB #AB405C #92AB40 #40AB8E
split-complementary
#5940AB #AB8E40 #5CAB40
monochromatic
#2B1F52 #422F7E #5940AB #7A63C5 #A090D5

Accessibility & contrast

On white

7.65
#5940AB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.75
#5940AB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #5940AB
7.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5940AB#FFFFFF#000000##FFFFFF
##5940AB1.007.652.757.65
#FFFFFF7.651.0021.001.00
#0000002.7521.001.0021.00
##FFFFFF7.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0056AE
Deuteranopia (green-blind)
#0051A9
Tritanopia (blue-blind)
#3E596F
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #5940ab;
/* rgb */ color: rgb(89, 64, 171);
/* oklch */ color: oklch(46.0% 0.163 289.1);
Tailwind
colors: {
  custom: {
    50: '#8e76c5',
    500: '#5940ab',
    950: '#000000',
  },
}
SCSS
$custom: #5940ab;
$custom-light: #8e76c5;
$custom-dark: #000000;
JSON
{
  "hex": "#5940ab",
  "rgb": {
    "r": 89,
    "g": 64,
    "b": 171
  },
  "hsl": {
    "h": 254.019,
    "s": 45.532,
    "l": 46.078
  },
  "oklch": {
    "l": 0.45964,
    "c": 0.16323,
    "h": 289.1
  },
  "luminance": 0.08731
}

Semantic roles & 50–950 ramp

primary
#5940AB
secondary
#B3C186
accent
#D553B7
background
#F9F7FC
surface
#F1EDF8
border
#CBC8D1
text
#0D0813
muted
#7E7B82

Preview Lab

Preview with #5940AB

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

Preview Lab → · Contrast checker → · Palette generator →

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