Skip to content

#040af4

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

RGB
4, 10, 244
HSL
239°, 97%, 49%
CMYK
98, 96, 0, 4
Luminance
0.0677

Every format

HEX#040af4
RGBrgb(4, 10, 244)
HSLhsl(239, 97%, 49%)
CMYKcmyk(98%, 96%, 0%, 4%)
LABlab(31.3 75.0 -103.4)
LCHlch(31.3 127.7 306.0)
OKLCHoklch(0.441 0.300 264.4)

Copy-ready code

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

Accessibility — WCAG contrast

Aa
#040af4 on white: 8.92:1
AA ✓ pass · AA-large · AAA
Aa
#040af4 on black: 2.35:1
AA ✗ fail · AA-large · AAA
true color
protanopia
deuteranopia
tritanopia

RGB percentages

Red1.6%
Green3.9%
Blue95.7%

CMYK percentages

Cyan98.4%
Magenta95.9%
Yellow0.0%
Key (black)4.3%

Color previews

#040af4 text on a black background

contrast 2.35:1

Card sample

#040af4 text on a white background

contrast 8.92:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

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

Glowing headline

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

Soft neon halo

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

Monochromatic scale

Palettes built from #040af4

Shades — darker

Tints — lighter

Hue & tone neighbors

Color harmonies

Nearest named colors

Work with #040af4 in the Color Lab