Skip to content

#5d40c2

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

RGB
93, 64, 194
HSL
253°, 52%, 51%
CMYK
52, 67, 0, 24
Luminance
0.0989

At a glance

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

Hex
#5d40c2
Hue
253°
blue
Saturation
52%
vivid
Lightness
51%
balanced
Brightness
76%
HSV value
Perceived
38%
weighted brightness
Luminance
0.0989
WCAG relative
Temperature
Cool
76/100 cool
Color family
Blue
Tone
Vivid
Best ink
White
7.05:1
Closest name
Slate Blue
ΔE2000 7.6
Where it sits
Hue253° of 360°
Saturation52%
Lightness51%
Temperature
Warm ← → Cool76% 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#5d40c2
RGBrgb(93, 64, 194)
HSLhsl(253, 52%, 51%)
CMYKcmyk(52%, 67%, 0%, 24%)
LABlab(37.6 45.3 -63.9)
LCHlch(37.6 78.4 305.3)
OKLCHoklch(0.482 0.192 287.1)
Decimal6111426
Display P3color(display-p3 0.365 0.251 0.761)

Copy-ready code

/* CSS */
color: #5d40c2;
background-color: #5d40c2;
/* Tailwind (arbitrary) */
class="text-[#5d40c2] bg-[#5d40c2]"
/* SCSS */
$brand: #5d40c2;
/* SwiftUI */
Color(red: 0.365, green: 0.251, blue: 0.761)
/* Android */
Color.parseColor("#5d40c2")
/* Flutter */
Color(0xFF5D40C2)
/* Python / OpenCV (BGR) */
(194, 64, 93)

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 #5d40c2 · 7.05:1
Use #ffffffAAA at every size.
Aa
White text · 7.05:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 2.98:1
AA fail · AA large fail · AAA fail
Reading the other direction: #5d40c2 as text scores 7.05:1 on white and 2.98:1 on black.

Accessibility — WCAG contrast

Aa
#5d40c2 on white: 7.05:1
AA ✓ pass · AA-large · AAA
Aa
#5d40c2 on black: 2.98:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #005CC6
deuteranopia · #0055BF
tritanopia · #36617C

Color scale — 50 to 950

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

#F6F4FA
#ECEAF6
#D6CFED
#B7AAE4
#937FD6
#6F55C9
#5d40c2
#49319B
#3A277C
#2D205A
#1C1438
Base = 600Lightest = 50 · #F6F4FADarkest = 950 · #1C1438
:root {
  --brand-50: #F6F4FA;
  --brand-100: #ECEAF6;
  --brand-200: #D6CFED;
  --brand-300: #B7AAE4;
  --brand-400: #937FD6;
  --brand-500: #6F55C9;
  --brand-600: #5d40c2;
  --brand-700: #49319B;
  --brand-800: #3A277C;
  --brand-900: #2D205A;
  --brand-950: #1C1438;
  --brand: #5d40c2;
  --brand-ink: #ffffff;
}

Colors that work with #5d40c2

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#F6F4FA
Tinted page background
Border#CBC1EB
Hairlines and dividers
Muted text#5D4B9B
Captions on the surface
Accent#9F9B2D
Second voice, not a rival
Dark variant#2E1F61
Hover, pressed, headers
Light variant#EFECF9
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 #5d40c2

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
  • Text on black or near-black surfaces
  • 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#A5C240
Analogous left#4064C2
Analogous right#9E40C2
Split-complement 1#C29E40
Split-complement 2#64C240
Triadic 1#C25D40
Triadic 2#40C25D
Tetradic#C24064

RGB percentages

Red36.5%
Green25.1%
Blue76.1%

CMYK percentages

Cyan52.1%
Magenta67.0%
Yellow0.0%
Key (black)23.9%

Color previews

#5d40c2 text on a black background

contrast 2.98:1

Card sample

#5d40c2 text on a white background

contrast 7.05:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #5d40c2

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.

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

#5d40c2, answered

What color is #5d40c2?

#5d40c2 is a balanced vivid blue, closest to Slate Blue (ΔE2000 7.6). It sits at 253° on the hue wheel with 52% saturation and 51% lightness, which reads as cool.

What is the RGB value of #5d40c2?

rgb(93, 64, 194) — 93 red, 64 green and 194 blue out of 255, or 36.5% / 25.1% / 76.1% by channel.

Is #5d40c2 a light or a dark color?

It is a dark color. Relative luminance is 0.0989 and perceived brightness is 38%, so white text on it reaches 7.05:1.

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

White. It scores 7.05:1 against #5d40c2, versus 2.98:1 for black — AAA at any size.

What is the complementary color of #5d40c2?

#A5C240 sits directly opposite on the wheel. Softer options are the split-complements #C29E40 and #64C240, which give the same contrast with far less vibration.

What colors go well with #5d40c2?

For interface work: #F6F4FA as the surface, #CBC1EB for borders, #5D4B9B for secondary text, #9F9B2D as an accent and #2E1F61 for hover and pressed states. For a palette, the analogous pair #4064C2 and #9E40C2 stays calm, while #A5C240 is the loudest partner.

What is #5d40c2 in CMYK for printing?

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

Is #5d40c2 warm or cool?

Cool — it scores 76 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #8D40C2; nudged cooler, #3E51C5.

Work with #5d40c2 in the Color Lab