Skip to content

#540dfd

a balanced, electric violet · warm · closest name: blue

RGB
84, 13, 253
HSL
258°, 98%, 52%
CMYK
67, 95, 0, 1
Luminance
0.0926

Every format

HEX#540dfd
RGBrgb(84, 13, 253)
HSLhsl(258, 98%, 52%)
CMYKcmyk(67%, 95%, 0%, 1%)
LABlab(36.5 78.5 -99.7)
LCHlch(36.5 126.9 308.2)
OKLCHoklch(0.489 0.291 279.7)

Copy-ready code

/* CSS */
color: #540dfd;
background-color: #540dfd;
/* Tailwind (arbitrary) */
class="text-[#540dfd] bg-[#540dfd]"
/* SCSS */
$brand: #540dfd;
/* SwiftUI */
Color(red: 0.329, green: 0.051, blue: 0.992)
/* Android */
Color.parseColor("#540dfd")

Accessibility — WCAG contrast

Aa
#540dfd on white: 7.36:1
AA ✓ pass · AA-large · AAA
Aa
#540dfd on black: 2.85:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red32.9%
Green5.1%
Blue99.2%

CMYK percentages

Cyan66.8%
Magenta94.9%
Yellow0.0%
Key (black)0.8%

Color previews

#540dfd text on a black background

contrast 2.85:1

Card sample

#540dfd text on a white background

contrast 7.36:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #540dfd

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #540dfd in the Color Lab