Skip to content

#540df0

a balanced, electric violet · cool · closest name: Blue

RGB
84, 13, 240
HSL
259°, 90%, 50%
CMYK
65, 95, 0, 6
Luminance
0.0846

At a glance

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

Hex
#540df0
Hue
259°
violet
Saturation
90%
electric
Lightness
50%
balanced
Brightness
94%
HSV value
Perceived
37%
weighted brightness
Luminance
0.0846
WCAG relative
Temperature
Cool
73/100 cool
Color family
Violet
Tone
Electric
Best ink
White
7.80:1
Closest name
Blue
ΔE2000 3.8
Where it sits
Hue259° of 360°
Saturation90%
Lightness50%
Temperature
Warm ← → Cool73% 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#540df0
RGBrgb(84, 13, 240)
HSLhsl(259, 90%, 50%)
CMYKcmyk(65%, 95%, 0%, 6%)
LABlab(34.9 75.5 -94.9)
LCHlch(34.9 121.3 308.5)
OKLCHoklch(0.475 0.279 281.2)
Decimal5508592
Display P3color(display-p3 0.329 0.051 0.941)

Copy-ready code

/* CSS */
color: #540df0;
background-color: #540df0;
/* Tailwind (arbitrary) */
class="text-[#540df0] bg-[#540df0]"
/* SCSS */
$brand: #540df0;
/* SwiftUI */
Color(red: 0.329, green: 0.051, blue: 0.941)
/* Android */
Color.parseColor("#540df0")
/* Flutter */
Color(0xFF540DF0)
/* Python / OpenCV (BGR) */
(240, 13, 84)

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

Accessibility — WCAG contrast

Aa
#540df0 on white: 7.80:1
AA ✓ pass · AA-large · AAA
Aa
#540df0 on black: 2.69:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #0059F5
deuteranopia · #004AED
tritanopia · #00638D

Color scale — 50 to 950

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

#F5F2FD
#ECE5FB
#D4C3F8
#B495F9
#8F5FF6
#692AF3
#540df0
#440BC1
#36089B
#2A0B70
#1A0746
Base = 600Lightest = 50 · #F5F2FDDarkest = 950 · #1A0746
:root {
  --brand-50: #F5F2FD;
  --brand-100: #ECE5FB;
  --brand-200: #D4C3F8;
  --brand-300: #B495F9;
  --brand-400: #8F5FF6;
  --brand-500: #692AF3;
  --brand-600: #540df0;
  --brand-700: #440BC1;
  --brand-800: #36089B;
  --brand-900: #2A0B70;
  --brand-950: #1A0746;
  --brand: #540df0;
  --brand-ink: #ffffff;
}

Colors that work with #540df0

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#CEC0ED
Hairlines and dividers
Muted text#644B9B
Captions on the surface
Accent#B9C606
Second voice, not a rival
Dark variant#2A0779
Hover, pressed, headers
Light variant#EEE7FE
Selected rows, tints
Dark surface#191424
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 #540df0

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#A9F00D
Analogous left#0D37F0
Analogous right#C60DF0
Split-complement 1#F0C60D
Split-complement 2#37F00D
Triadic 1#F0540D
Triadic 2#0DF054
Tetradic#F00D37

RGB percentages

Red32.9%
Green5.1%
Blue94.1%

CMYK percentages

Cyan65.0%
Magenta94.6%
Yellow0.0%
Key (black)5.9%

Color previews

#540df0 text on a black background

contrast 2.69:1

Card sample

#540df0 text on a white background

contrast 7.80:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #540df0;
Background color
Panel with #540df0 background
background-color: #540df0;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #540df0;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(84, 13, 240, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(84, 13, 240, 0.45);
Border & gradient
Gradient panel
border: 3px solid #540df0;
background: linear-gradient(135deg, #540df0, #EB0DF0);

Monochromatic scale

Palettes built from #540df0

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.

#540df0 in the real world

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

Industries
Creative toolsFintechBeautyLuxury
Common UI roles
ButtonsLinksFocus statesCharts
Print note

Sits outside most CMYK gamuts — expect a duller press result, or specify a spot ink.

#540df0, answered

What color is #540df0?

#540df0 is a balanced electric violet, closest to Blue (ΔE2000 3.8). It sits at 259° on the hue wheel with 90% saturation and 50% lightness, which reads as cool.

What is the RGB value of #540df0?

rgb(84, 13, 240) — 84 red, 13 green and 240 blue out of 255, or 32.9% / 5.1% / 94.1% by channel.

Is #540df0 a light or a dark color?

It is a dark color. Relative luminance is 0.0846 and perceived brightness is 37%, so white text on it reaches 7.80:1.

Should I use black or white text on #540df0?

White. It scores 7.80:1 against #540df0, versus 2.69:1 for black — AAA at any size.

What is the complementary color of #540df0?

#A9F00D sits directly opposite on the wheel. Softer options are the split-complements #F0C60D and #37F00D, which give the same contrast with far less vibration.

What colors go well with #540df0?

For interface work: #F6F4FA as the surface, #CEC0ED for borders, #644B9B for secondary text, #B9C606 as an accent and #2A0779 for hover and pressed states. For a palette, the analogous pair #0D37F0 and #C60DF0 stays calm, while #A9F00D is the loudest partner.

What is #540df0 in CMYK for printing?

cmyk(65%, 95%, 0%, 6%). This is a screen-to-ink approximation — a color this saturated sits outside most CMYK gamuts and will print duller than it looks here.

Is #540df0 warm or cool?

Cool — it scores 73 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #A70DF0; nudged cooler, #0A17F2.

Work with #540df0 in the Color Lab