#5940CB#5940CB

#5940CB is a mid, highly saturated violet. Relative luminance 0.101; OKLCH L 48.6% C 0.203 H 284.1°. Best body text is #FFFFFF at 6.95:1 contrast (WCAG AA passes).

Color values

HEX#5940CB
RGBrgb(89, 64, 203)
HSLhsl(251, 57%, 52%)
HSVhsv(251, 68%, 80%)
CMYKcmyk(56.2%, 68.5%, 0%, 20.4%)
CIE-LABlab(38.02, 47.35, -68.57)
CIE-LCHlch(38.02, 83.33, 304.63°)
OKLaboklab(48.62% 0.0496 -0.1973)
OKLCHoklch(48.62% 0.203 284.1)
XYZxyz(16.7294, 10.1014, 57.5566)
Luminance0.1010 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#5940CB #B2CB40
analogous
#406DCB #5940CB #9E40CB
triadic
#5940CB #CB5940 #40CB59
tetradic
#5940CB #CB406D #B2CB40 #40CB9E
square
#5940CB #CB406D #B2CB40 #40CB9E
split-complementary
#5940CB #CB9E40 #6DCB40
monochromatic
#2E1F72 #412CA2 #5940CB #8370D8 #ADA0E5

Accessibility & contrast

On white

6.95
#5940CB on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.02
#5940CB on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #5940CB
6.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##5940CB#FFFFFF#000000##FFFFFF
##5940CB1.006.953.026.95
#FFFFFF6.951.0021.001.00
#0000003.0221.001.0021.00
##FFFFFF6.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ECF
Deuteranopia (green-blind)
#0055C8
Tritanopia (blue-blind)
#206480
Achromatopsia (no color)
#595959

Design tokens & code

CSS
--color: #5940cb;
/* rgb */ color: rgb(89, 64, 203);
/* oklch */ color: oklch(48.6% 0.203 284.1);
Tailwind
colors: {
  custom: {
    50: '#9377dc',
    500: '#5940cb',
    950: '#000000',
  },
}
SCSS
$custom: #5940cb;
$custom-light: #9377dc;
$custom-dark: #000000;
JSON
{
  "hex": "#5940cb",
  "rgb": {
    "r": 89,
    "g": 64,
    "b": 203
  },
  "hsl": {
    "h": 250.791,
    "s": 57.202,
    "l": 52.353
  },
  "oklch": {
    "l": 0.48616,
    "c": 0.2034,
    "h": 284.1
  },
  "luminance": 0.10102
}

Semantic roles & 50–950 ramp

primary
#5940CB
secondary
#C7D295
accent
#E047C5
background
#F9F7FD
surface
#F2EDFB
border
#CCC8D4
text
#0E0915
muted
#7E7B83

Preview Lab

Preview with #5940CB

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

Preview Lab → · Contrast checker → · Palette generator →

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