#5940CA#5940CA

#5940CA is a mid, highly saturated violet. Relative luminance 0.101; OKLCH L 48.5% C 0.202 H 284.2°. Best body text is #FFFFFF at 6.97:1 contrast (WCAG AA passes).

Color values

HEX#5940CA
RGBrgb(89, 64, 202)
HSLhsl(251, 57%, 52%)
HSVhsv(251, 68%, 79%)
CMYKcmyk(55.9%, 68.3%, 0%, 20.8%)
CIE-LABlab(37.94, 47.05, -68.13)
CIE-LCHlch(37.94, 82.79, 304.63°)
OKLaboklab(48.53% 0.0497 -0.196)
OKLCHoklch(48.53% 0.202 284.2)
XYZxyz(16.6106, 10.0539, 56.9310)
Luminance0.1006 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5940CA #B1CA40
analogous
#406CCA #5940CA #9E40CA
triadic
#5940CA #CA5940 #40CA59
tetradic
#5940CA #CA406C #B1CA40 #40CA9E
square
#5940CA #CA406C #B1CA40 #40CA9E
split-complementary
#5940CA #CA9E40 #6CCA40
monochromatic
#2E1F70 #412CA0 #5940CA #8370D7 #ACA0E5

Accessibility & contrast

On white

6.97
#5940CA on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.01
#5940CA on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5940CA
6.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5940CA#FFFFFF#000000##FFFFFF
##5940CA1.006.973.016.97
#FFFFFF6.971.0021.001.00
#0000003.0121.001.0021.00
##FFFFFF6.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DCE
Deuteranopia (green-blind)
#0055C7
Tritanopia (blue-blind)
#226480
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #5940ca;
/* rgb */ color: rgb(89, 64, 202);
/* oklch */ color: oklch(48.5% 0.202 284.2);
Tailwind
colors: {
  custom: {
    50: '#9377db',
    500: '#5940ca',
    950: '#000000',
  },
}
SCSS
$custom: #5940ca;
$custom-light: #9377db;
$custom-dark: #000000;
JSON
{
  "hex": "#5940ca",
  "rgb": {
    "r": 89,
    "g": 64,
    "b": 202
  },
  "hsl": {
    "h": 250.87,
    "s": 56.557,
    "l": 52.157
  },
  "oklch": {
    "l": 0.48529,
    "c": 0.20218,
    "h": 284.2
  },
  "luminance": 0.10055
}

Semantic roles & 50–950 ramp

primary
#5940CA
secondary
#C6D195
accent
#E048C4
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5940CA

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

Preview Lab → · Contrast checker → · Palette generator →

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