Skip to content

#041f49

a deep, electric blue · cool · closest name: Midnight Blue

RGB
4, 31, 73
HSL
217°, 90%, 15%
CMYK
95, 58, 0, 71
Luminance
0.0149

At a glance

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

Hex
#041f49
Hue
217°
blue
Saturation
90%
electric
Lightness
15%
deep
Brightness
29%
HSV value
Perceived
13%
weighted brightness
Luminance
0.0149
WCAG relative
Temperature
Cool
96/100 cool
Color family
Blue
Tone
Electric
Best ink
White
16.19:1
Closest name
Midnight Blue
ΔE2000 9.4
Where it sits
Hue217° of 360°
Saturation90%
Lightness15%
Temperature
Warm ← → Cool96% 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#041f49
RGBrgb(4, 31, 73)
HSLhsl(217, 90%, 15%)
CMYKcmyk(95%, 58%, 0%, 71%)
LABlab(12.5 8.9 -29.0)
LCHlch(12.5 30.3 287.1)
OKLCHoklch(0.249 0.085 259.0)
Decimal270153
Display P3color(display-p3 0.016 0.122 0.286)

Copy-ready code

/* CSS */
color: #041f49;
background-color: #041f49;
/* Tailwind (arbitrary) */
class="text-[#041f49] bg-[#041f49]"
/* SCSS */
$brand: #041f49;
/* SwiftUI */
Color(red: 0.016, green: 0.122, blue: 0.286)
/* Android */
Color.parseColor("#041f49")
/* Flutter */
Color(0xFF041F49)
/* Python / OpenCV (BGR) */
(73, 31, 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 #041f49 · 16.19:1
Use #ffffffAAA at every size.
Aa
White text · 16.19:1 · recommended
AA pass · AA large pass · AAA pass
Aa
Black text · 1.30:1
AA fail · AA large fail · AAA fail
Reading the other direction: #041f49 as text scores 16.19:1 on white and 1.30:1 on black.

Accessibility — WCAG contrast

Aa
#041f49 on white: 16.19:1
AA ✓ pass · AA-large · AAA
Aa
#041f49 on black: 1.30:1
AA ✗ fail · AA-large · AAA
true color
protanopia · #03244B
deuteranopia · #001E48
tritanopia · #002930

Color scale — 50 to 950

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

#F2F6FD
#E5EDFB
#C3D8F8
#95BCF9
#5F9BF6
#2A79F3
#0D63E8
#0B52C1
#08429B
#0B3270
#041f49
Base = 950Lightest = 50 · #F2F6FDDarkest = 950 · #041f49
:root {
  --brand-50: #F2F6FD;
  --brand-100: #E5EDFB;
  --brand-200: #C3D8F8;
  --brand-300: #95BCF9;
  --brand-400: #5F9BF6;
  --brand-500: #2A79F3;
  --brand-600: #0D63E8;
  --brand-700: #0B52C1;
  --brand-800: #08429B;
  --brand-900: #0B3270;
  --brand-950: #041f49;
  --brand: #041f49;
  --brand-ink: #ffffff;
}

Colors that work with #041f49

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#F4F7FA
Tinted page background
Border#C0D1ED
Hairlines and dividers
Muted text#4B6A9B
Captions on the surface
Accent#4B1C02
Second voice, not a rival
Dark variant#073379
Hover, pressed, headers
Light variant#E7F0FE
Selected rows, tints
Dark surface#141A24
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 #041f49

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#492E04
Analogous left#044249
Analogous right#0B0449
Split-complement 1#490B04
Split-complement 2#424904
Triadic 1#49041F
Triadic 2#1F4904
Tetradic#490442

RGB percentages

Red1.6%
Green12.2%
Blue28.6%

CMYK percentages

Cyan94.5%
Magenta57.5%
Yellow0.0%
Key (black)71.4%

Color previews

#041f49 text on a black background

contrast 1.30:1

Card sample

#041f49 text on a white background

contrast 16.19:1

Card sample

CSS3 live lab

Text font color

The quick brown fox

color: #041f49;
Background color
Panel with #041f49 background
background-color: #041f49;
Text shadow — hex

Glowing headline

text-shadow: 2px 2px 8px #041f49;
Text shadow — RGB

Soft neon halo

text-shadow: 0 0 14px rgba(4, 31, 73, 0.45);
Div box shadow
Elevated card
box-shadow: 0 12px 32px -8px rgba(4, 31, 73, 0.45);
Border & gradient
Gradient panel
border: 3px solid #041f49;
background: linear-gradient(135deg, #041f49, #170449);

Monochromatic scale

Palettes built from #041f49

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.

#041f49 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.

#041f49, answered

What color is #041f49?

#041f49 is a deep electric blue, closest to Midnight Blue (ΔE2000 9.4). It sits at 217° on the hue wheel with 90% saturation and 15% lightness, which reads as cool.

What is the RGB value of #041f49?

rgb(4, 31, 73) — 4 red, 31 green and 73 blue out of 255, or 1.6% / 12.2% / 28.6% by channel.

Is #041f49 a light or a dark color?

It is a dark color. Relative luminance is 0.0149 and perceived brightness is 13%, so white text on it reaches 16.19:1.

Should I use black or white text on #041f49?

White. It scores 16.19:1 against #041f49, versus 1.30:1 for black — AAA at any size.

What is the complementary color of #041f49?

#492E04 sits directly opposite on the wheel. Softer options are the split-complements #490B04 and #424904, which give the same contrast with far less vibration.

What colors go well with #041f49?

For interface work: #F4F7FA as the surface, #C0D1ED for borders, #4B6A9B for secondary text, #4B1C02 as an accent and #073379 for hover and pressed states. For a palette, the analogous pair #044249 and #0B0449 stays calm, while #492E04 is the loudest partner.

What is #041f49 in CMYK for printing?

cmyk(95%, 58%, 0%, 71%). 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 #041f49 warm or cool?

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

Work with #041f49 in the Color Lab