Skip to content

#5c40df

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

RGB
92, 64, 223
HSL
251°, 71%, 56%
CMYK
59, 71, 0, 13
Luminance
0.1127

At a glance

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

Hex
#5c40df
Hue
251°
blue
Saturation
71%
vivid
Lightness
56%
balanced
Brightness
87%
HSV value
Perceived
40%
weighted brightness
Luminance
0.1127
WCAG relative
Temperature
Cool
77/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
6.45:1
Closest name
Blue Violet
ΔE2000 7.2
Where it sits
Hue251° of 360°
Saturation71%
Lightness56%
Temperature
Warm ← → Cool77% 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#5c40df
RGBrgb(92, 64, 223)
HSLhsl(251, 71%, 56%)
CMYKcmyk(59%, 71%, 0%, 13%)
LABlab(40.0 53.7 -76.8)
LCHlch(40.0 93.7 305.0)
OKLCHoklch(0.506 0.227 282.7)
Decimal6045919
Display P3color(display-p3 0.361 0.251 0.875)

Copy-ready code

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

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 #5c40df · 6.45:1
Use #ffffffAA at every size, AAA for large text only.
Aa
White text · 6.45:1 · recommended
AA pass · AA large pass · AAA fail
Aa
Black text · 3.25:1
AA fail · AA large pass · AAA fail
Reading the other direction: #5c40df as text scores 6.45:1 on white and 3.25:1 on black.

Accessibility — WCAG contrast

Aa
#5c40df on white: 6.45:1
AA ✓ pass · AA-large · AAA
Aa
#5c40df on black: 3.25:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0063E4
deuteranopia · #0059DC
tritanopia · #006B8B

Color scale — 50 to 950

A Tailwind-shaped ramp built around this exact hex. #5c40df 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.

#F5F3FC
#EAE7F8
#D0C9F3
#AD9FEF
#846FE7
#5c40df
#4223D2
#371DAF
#2C178C
#231565
#160D3F
Base = 500Lightest = 50 · #F5F3FCDarkest = 950 · #160D3F
:root {
  --brand-50: #F5F3FC;
  --brand-100: #EAE7F8;
  --brand-200: #D0C9F3;
  --brand-300: #AD9FEF;
  --brand-400: #846FE7;
  --brand-500: #5c40df;
  --brand-600: #4223D2;
  --brand-700: #371DAF;
  --brand-800: #2C178C;
  --brand-900: #231565;
  --brand-950: #160D3F;
  --brand: #5c40df;
  --brand-ink: #ffffff;
}

Colors that work with #5c40df

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#C8C0ED
Hairlines and dividers
Muted text#594B9B
Captions on the surface
Accent#B2A71A
Second voice, not a rival
Dark variant#22126D
Hover, pressed, headers
Light variant#ECE9FB
Selected rows, tints
Dark surface#171424
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 #5c40df

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#C3DF40
Analogous left#4073DF
Analogous right#AC40DF
Split-complement 1#DFAC40
Split-complement 2#73DF40
Triadic 1#DF5C40
Triadic 2#40DF5C
Tetradic#DF4073

RGB percentages

Red36.1%
Green25.1%
Blue87.5%

CMYK percentages

Cyan58.7%
Magenta71.3%
Yellow0.0%
Key (black)12.5%

Color previews

#5c40df text on a black background

contrast 3.25:1

Card sample

#5c40df text on a white background

contrast 6.45:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #5c40df;
Background color
Panel with #5c40df background
background-color: #5c40df;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #5c40df;
Text shadow — RGB

Soft neon halo

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

Monochromatic scale

Palettes built from #5c40df

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.

#5c40df 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.

#5c40df, answered

What color is #5c40df?

#5c40df is a balanced vivid blue, closest to Blue Violet (ΔE2000 7.2). It sits at 251° on the hue wheel with 71% saturation and 56% lightness, which reads as cool.

What is the RGB value of #5c40df?

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

Is #5c40df a light or a dark color?

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

Should I use black or white text on #5c40df?

White. It scores 6.45:1 against #5c40df, versus 3.25:1 for black — AA at any size.

What is the complementary color of #5c40df?

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

What colors go well with #5c40df?

For interface work: #F5F4FA as the surface, #C8C0ED for borders, #594B9B for secondary text, #B2A71A as an accent and #22126D for hover and pressed states. For a palette, the analogous pair #4073DF and #AC40DF stays calm, while #C3DF40 is the loudest partner.

What is #5c40df in CMYK for printing?

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

Is #5c40df warm or cool?

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

Work with #5c40df in the Color Lab