Skip to content

#040cfd

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

RGB
4, 12, 253
HSL
238°, 98%, 50%
CMYK
98, 95, 0, 1
Luminance
0.0738

Every format

HEX#040cfd
RGBrgb(4, 12, 253)
HSLhsl(238, 98%, 50%)
CMYKcmyk(98%, 95%, 0%, 1%)
LABlab(32.6 76.9 -106.1)
LCHlch(32.6 131.1 305.9)
OKLCHoklch(0.454 0.308 264.4)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#040cfd on white: 8.48:1
AA ✓ pass · AA-large · AAA
Aa
#040cfd on black: 2.48:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red1.6%
Green4.7%
Blue99.2%

CMYK percentages

Cyan98.4%
Magenta95.3%
Yellow0.0%
Key (black)0.8%

Color previews

#040cfd text on a black background

contrast 2.48:1

Card sample

#040cfd text on a white background

contrast 8.48:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #040cfd;
Background color
Panel with #040cfd background
background-color: #040cfd;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #040cfd;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(4, 12, 253, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(4, 12, 253, 0.45);
Border & gradient
Gradient panel
border: 3px solid #040cfd;
background: linear-gradient(135deg, #040cfd, #A204FD);

Monochromatic scale

Palettes built from #040cfd

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #040cfd in the Color Lab