Skip to content

#5940df

a balanced, vivid blue · cool · closest name: Slate Blue

RGB
89, 64, 223
HSL
249°, 71%, 56%
CMYK
60, 71, 0, 13
Luminance
0.1112

At a glance

Every number on this page in one read: what #5940df is made of, how bright it looks, and which way it leans.

Hex
#5940df
Hue
249°
blue
Saturation
71%
vivid
Lightness
56%
balanced
Brightness
87%
HSV value
Perceived
40%
weighted brightness
Luminance
0.1112
WCAG relative
Temperature
Cool
78/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
6.51:1
Closest name
Slate Blue
ΔE2000 7.4
Where it sits
Hue249° of 360°
Saturation71%
Lightness56%
Temperature
Warm ← → Cool78% cool

Reads cool. Warm and cool siblings keep the same lightness, so you can swap one in without redoing your contrast maths.

Every format

HEX#5940df
RGBrgb(89, 64, 223)
HSLhsl(249, 71%, 56%)
CMYKcmyk(60%, 71%, 0%, 13%)
LABlab(39.8 53.3 -77.2)
LCHlch(39.8 93.8 304.6)
OKLCHoklch(0.504 0.227 281.7)
Decimal5849311
Display P3color(display-p3 0.349 0.251 0.875)

Copy-ready code

/* CSS */
color: #5940df;
background-color: #5940df;
/* Tailwind (arbitrary) */
class="text-[#5940df] bg-[#5940df]"
/* SCSS */
$brand: #5940df;
/* SwiftUI */
Color(red: 0.349, green: 0.251, blue: 0.875)
/* Android */
Color.parseColor("#5940df")
/* Flutter */
Color(0xFF5940DF)
/* Python / OpenCV (BGR) */
(223, 64, 89)

Best text color

Only one of black and white can be right. This is the one, with the number that proves it.

Readable at a glance#ffffff on #5940df · 6.51:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 6.51:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 3.22:1
AA fail · AA large pass · AAA fail
Reading the other direction: #5940df as text scores 6.51:1 on white and 3.22:1 on black.

Accessibility — WCAG contrast

Aa
#5940df on white: 6.51:1
AA ✓ pass · AA-large · AAA
Aa
#5940df on black: 3.22:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0063E4
deuteranopia · #0058DC
tritanopia · #006C8B

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #5940df is pinned to step 500; the rest hold its hue and let saturation ease off at the extremes so the pale end never turns neon.

#F4F3FC
#EAE7F8
#D0C9F3
#AB9FEF
#826FE7
#5940df
#3E23D2
#341DAF
#2A178C
#221565
#150D3F
Base = 500Lightest = 50 · #F4F3FCDarkest = 950 · #150D3F
:root {
  --brand-50: #F4F3FC;
  --brand-100: #EAE7F8;
  --brand-200: #D0C9F3;
  --brand-300: #AB9FEF;
  --brand-400: #826FE7;
  --brand-500: #5940df;
  --brand-600: #3E23D2;
  --brand-700: #341DAF;
  --brand-800: #2A178C;
  --brand-900: #221565;
  --brand-950: #150D3F;
  --brand: #5940df;
  --brand-ink: #ffffff;
}

Colors that work with #5940df

Not a palette — a role sheet. Each swatch answers one question you will hit while building the component.

Text on it#ffffff
White wins here
Surface#F5F4FA
Tinted page background
Border#C7C0ED
Hairlines and dividers
Muted text#574B9B
Captions on the surface
Accent#B2A51A
Second voice, not a rival
Dark variant#21126D
Hover, pressed, headers
Light variant#ECE9FB
Selected rows, tints
Dark surface#161424
Dark-mode background
Light mode
Everything in its place

Surface, border, heading and body all derive from this one hue, so the screen stays coherent without a second palette.

Primary actionSecondaryBadge
Dark mode
Same hue, inverted

Lightness flips, hue holds. The accent stays the anchor in both themes.

Primary actionSecondaryAccent

How to use #5940df

Derived from its contrast, chroma and lightness — not from taste.

Works well for
  • Body text and links on white
  • Primary buttons and calls to action
  • Focus rings, active and selected states
  • Brand accents, badges and data highlights
Use with care
  • Full-page backgrounds — tiring over long sessions
  • Pairing with a same-lightness hue — edges vibrate

Similar colors

One move away from this hex in each direction. Every swatch is its own page.

Color relationships

The wheel positions with their names attached, so you can grab the one you actually need.

Complementary#C6DF40
Analogous left#4077DF
Analogous right#A840DF
Split-complement 1#DFA840
Split-complement 2#77DF40
Triadic 1#DF5940
Triadic 2#40DF59
Tetradic#DF4077

RGB percentages

Red34.9%
Green25.1%
Blue87.5%

CMYK percentages

Cyan60.1%
Magenta71.3%
Yellow0.0%
Key (black)12.5%

Color previews

#5940df text on a black background

contrast 3.22:1

Card sample

#5940df text on a white background

contrast 6.51:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #5940df;
Background color
Panel with #5940df background
background-color: #5940df;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #5940df;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(89, 64, 223, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(89, 64, 223, 0.45);
Border & gradient
Gradient panel
border: 3px solid #5940df;
background: linear-gradient(135deg, #5940df, #C340DF);

Monochromatic scale

Palettes built from #5940df

Shades — darker

Tints — lighter

Color harmonies

Nearest named colors

Ranked with CIEDE2000 across all 139 CSS keywords. Under ΔE 2 the eye stops telling them apart; over ΔE 10 they are plainly different colors.

#5940df in the real world

Where a color in this family tends to land, and the interface roles it is usually asked to play.

Industries
TechnologyFinanceHealthcareEnterprise SaaS
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Converts to four-color process without much drama. Proof it anyway.

#5940df, answered

What color is #5940df?

#5940df is a balanced vivid blue, closest to Slate Blue (ΔE2000 7.4). It sits at 249° on the hue wheel with 71% saturation and 56% lightness, which reads as cool.

What is the RGB value of #5940df?

rgb(89, 64, 223) — 89 red, 64 green and 223 blue out of 255, or 34.9% / 25.1% / 87.5% by channel.

Is #5940df a light or a dark color?

It is a dark color. Relative luminance is 0.1112 and perceived brightness is 40%, so white text on it reaches 6.51:1.

Should I use black or white text on #5940df?

White. It scores 6.51:1 against #5940df, versus 3.22:1 for black — AA at any size.

What is the complementary color of #5940df?

#C6DF40 sits directly opposite on the wheel. Softer options are the split-complements #DFA840 and #77DF40, which give the same contrast with far less vibration.

What colors go well with #5940df?

For interface work: #F5F4FA as the surface, #C7C0ED for borders, #574B9B for secondary text, #B2A51A as an accent and #21126D for hover and pressed states. For a palette, the analogous pair #4077DF and #A840DF stays calm, while #C6DF40 is the loudest partner.

What is #5940df in CMYK for printing?

cmyk(60%, 71%, 0%, 13%). This is a screen-to-ink approximation — ask your printer for a proof before committing to a run.

Is #5940df warm or cool?

Cool — it scores 78 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #9340DF; nudged cooler, #3E5FE1.

Work with #5940df in the Color Lab