Skip to content

#04071d

a deep, electric blue · cool · closest name: Black

RGB
4, 7, 29
HSL
233°, 76%, 7%
CMYK
86, 76, 0, 89
Luminance
0.0027

At a glance

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

Hex
#04071d
Hue
233°
blue
Saturation
76%
electric
Lightness
7%
deep
Brightness
11%
HSV value
Perceived
4%
weighted brightness
Luminance
0.0027
WCAG relative
Temperature
Cool
87/100 cool
Color family
Blue
Tone
Electric
Best ink
White
19.94:1
Closest name
Black
ΔE2000 10.7
Where it sits
Hue233° of 360°
Saturation76%
Lightness7%
Temperature
Warm ← → Cool87% 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#04071d
RGBrgb(4, 7, 29)
HSLhsl(233, 76%, 7%)
CMYKcmyk(86%, 76%, 0%, 89%)
LABlab(2.4 3.9 -12.7)
LCHlch(2.4 13.3 286.9)
OKLCHoklch(0.142 0.048 270.8)
Decimal263965
Display P3color(display-p3 0.016 0.027 0.114)

Copy-ready code

/* CSS */
color: #04071d;
background-color: #04071d;
/* Tailwind (arbitrary) */
class="text-[#04071d] bg-[#04071d]"
/* SCSS */
$brand: #04071d;
/* SwiftUI */
Color(red: 0.016, green: 0.027, blue: 0.114)
/* Android */
Color.parseColor("#04071d")
/* Flutter */
Color(0xFF04071D)
/* Python / OpenCV (BGR) */
(29, 7, 4)

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

Accessibility — WCAG contrast

Aa
#04071d on white: 19.94:1
AA ✓ pass · AA-large · AAA
Aa
#04071d on black: 1.05:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #000A1E
deuteranopia · #00081D
tritanopia · #000C10

Color scale — 50 to 950

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

#F3F4FC
#E7E9F9
#C8CDF4
#9CA7F1
#6B7AEB
#3A4EE4
#1E34D7
#192BB3
#14238F
#131D68
#04071d
Base = 950Lightest = 50 · #F3F4FCDarkest = 950 · #04071d
:root {
  --brand-50: #F3F4FC;
  --brand-100: #E7E9F9;
  --brand-200: #C8CDF4;
  --brand-300: #9CA7F1;
  --brand-400: #6B7AEB;
  --brand-500: #3A4EE4;
  --brand-600: #1E34D7;
  --brand-700: #192BB3;
  --brand-800: #14238F;
  --brand-900: #131D68;
  --brand-950: #04071d;
  --brand: #04071d;
  --brand-ink: #ffffff;
}

Colors that work with #04071d

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#F4F5FA
Tinted page background
Border#C0C5ED
Hairlines and dividers
Muted text#4B549B
Captions on the surface
Accent#1E1403
Second voice, not a rival
Dark variant#0F1B70
Hover, pressed, headers
Light variant#E9EBFC
Selected rows, tints
Dark surface#141624
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 #04071d

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
  • Headers, footers and dark-mode surfaces
  • Brand accents, badges and data highlights
Use with care
  • Text on black or near-black surfaces
  • Full-page backgrounds — tiring over long sessions
  • Black text placed on it
  • 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#1D1A04
Analogous left#04141D
Analogous right#0E041D
Split-complement 1#1D0E04
Split-complement 2#141D04
Triadic 1#1D0407
Triadic 2#071D04
Tetradic#1D0414

RGB percentages

Red1.6%
Green2.7%
Blue11.4%

CMYK percentages

Cyan86.2%
Magenta75.9%
Yellow0.0%
Key (black)88.6%

Color previews

#04071d text on a black background

contrast 1.05:1

Card sample

#04071d text on a white background

contrast 19.94:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #04071d;
Background color
Panel with #04071d background
background-color: #04071d;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #04071d;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(4, 7, 29, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(4, 7, 29, 0.45);
Border & gradient
Gradient panel
border: 3px solid #04071d;
background: linear-gradient(135deg, #04071d, #12041D);

Monochromatic scale

Palettes built from #04071d

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.

#04071d 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

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

#04071d, answered

What color is #04071d?

#04071d is a deep electric blue, closest to Black (ΔE2000 10.7). It sits at 233° on the hue wheel with 76% saturation and 7% lightness, which reads as cool.

What is the RGB value of #04071d?

rgb(4, 7, 29) — 4 red, 7 green and 29 blue out of 255, or 1.6% / 2.7% / 11.4% by channel.

Is #04071d a light or a dark color?

It is a dark color. Relative luminance is 0.0027 and perceived brightness is 4%, so white text on it reaches 19.94:1.

Should I use black or white text on #04071d?

White. It scores 19.94:1 against #04071d, versus 1.05:1 for black — AAA at any size.

What is the complementary color of #04071d?

#1D1A04 sits directly opposite on the wheel. Softer options are the split-complements #1D0E04 and #141D04, which give the same contrast with far less vibration.

What colors go well with #04071d?

For interface work: #F4F5FA as the surface, #C0C5ED for borders, #4B549B for secondary text, #1E1403 as an accent and #0F1B70 for hover and pressed states. For a palette, the analogous pair #04141D and #0E041D stays calm, while #1D1A04 is the loudest partner.

What is #04071d in CMYK for printing?

cmyk(86%, 76%, 0%, 89%). 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 #04071d warm or cool?

Cool — it scores 87 on a scale where 0 is the warmest orange and 100 the coolest azure. Nudged warmer it becomes #0A041D; nudged cooler, #040F1D.

Work with #04071d in the Color Lab