Midnight Navy Blue Color Code and Design Inspiration

The darkest end of the navy family and how to build depth into near-black interfaces.

Midnight navy is the most atmospheric member of the navy family. Where classic navy signals institutions and royal navy signals action, midnight navy signals night, depth and quiet. It is the colour of astronomy apps, luxury watch advertising and every dark mode that wants to feel considered rather than merely inverted. This guide covers the values in that family, why they behave differently from other navies and how to design with them.

Midnight Blue, the named colour

The CSS keyword midnightblue resolves to , or rgb(25, 25, 112). Two things stand out in those channel values. The red channel is not zero, and the blue channel is well below the 128 that navy uses. That combination is what produces the violet cast people notice immediately.

In HSL it reads as hsl(240, 64%, 27%). Compared with Navy Blue at 25% lightness, midnight is very slightly lighter. Almost everyone guesses the opposite, because the violet lean makes it feel heavier and more atmospheric even though the measured lightness says otherwise. This is a useful reminder that perceived depth is not the same as measured lightness.

The midnight family

Midnight navy shades compared
ShadeHEXHueSaturationLightness
Midnight Blue #191970 240° 64% 27%
Midnight Navy #0B132B 225° 59% 11%
Eclipse Navy #080F26 226° 65% 9%
Ink Blue #0A1128 226° 60% 10%
Sapphire Night #0D1B3E 223° 65% 15%
Obsidian Blue #10182B 222° 46% 12%
Space Cadet #1D2951 226° 47% 22%
Deep Sea Navy #04203A 209° 87% 12%

Notice the split. Midnight Blue and Space Cadet are saturated and violet-leaning; they are display colours, meant to be seen. Midnight Navy, Eclipse Navy and Obsidian Blue are far less saturated; they are working colours, meant to sit behind content for hours without fatiguing anyone.

Designing with atmospheric navy

Depth through layered transparency

The night-sky quality that makes midnight navy appealing comes from gradation, not from a flat fill. A single radial gradient offset toward one corner produces the effect convincingly:

.night-hero {
  background:
    radial-gradient(900px 400px at 20% -10%, #26265C 0%, transparent 60%),
    linear-gradient(165deg, #080F26 0%, #0B132B 55%, #0D1B3E 100%);
  color: #E7EDF8;
}

The first gradient acts as an ambient glow and the second carries the base. Keeping both within the same hue range prevents the muddiness that appears when a warm gradient is layered over a cool one.

Points of light

Midnight navy invites small bright accents, the visual equivalent of stars. A few precisely placed light elements against a large dark field is a stronger composition than an evenly lit one:

.starfield {
  background-color: #080F26;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #E7EDF8 50%, transparent 50%),
    radial-gradient(1px 1px at 65% 18%, #A9B8D4 50%, transparent 50%),
    radial-gradient(2px 2px at 82% 62%, #FFFFFF 50%, transparent 50%);
  background-repeat: no-repeat;
}

Use this sparingly. It is charming once per site and tiresome on every section.

Warm counterweights

A page made entirely of midnight navy reads as cold. One warm element fixes it, and the effect is out of all proportion to the amount of colour used. Brass against midnight navy is the classic pairing; a warm off-white for body text achieves the same thing more subtly.

Midnight navy in practice

Dark mode interfaces

Use the low-saturation members of the family, not Midnight Blue itself. gives 15.64:1 against off-white text and stays comfortable over long sessions. Highly saturated dark blues can produce a subtle vibrating sensation when text sits directly on them, which is fine for a hero section and not fine for a settings page.

Luxury and premium goods

Watches, spirits, perfume and audio equipment all use midnight navy heavily. It photographs well, it makes metallic finishes look brighter by contrast, and it carries an association with evening and occasion that lighter blues do not.

Astronomy, sleep and calm applications

The literal association does real work here. A sleep tracking app in midnight navy communicates its purpose before a single word is read. This is one of the few cases where the obvious colour choice is also the correct one.

Where it fails

Midnight navy is a poor choice for anything requiring urgency, clarity under pressure or use in bright environments. Field applications used outdoors in sunlight need high-contrast light themes. A violet-leaning dark blue on a phone screen in direct sun is close to unreadable.

Typography on midnight navy

Dark backgrounds change how type behaves. Light characters on a dark field appear optically heavier than the same characters dark on light, an effect called irradiation. The practical consequence is that a weight which looks correct in a light theme looks slightly bloated in a dark one.

Two adjustments fix it. Drop one weight step for body copy, so a 400 becomes a 350 or 300 if your typeface supports it. And increase letter spacing very slightly on small text, around 0.01em, which restores the counters that irradiation fills in.

.theme-midnight {
  background: #0B132B;
  color: #E7EDF8;
}

.theme-midnight p {
  font-weight: 350;
  letter-spacing: 0.01em;
}

.theme-midnight h2 {
  font-weight: 550; /* headings need less correction than body text */
}

Images and video on midnight navy

Photographs placed directly on a midnight navy page tend to look like bright rectangles floating in space, because the jump from a 9% lightness background to a full-range image is abrupt. Three techniques soften the transition.

A subtle border in a slightly lighter navy gives the image an edge to sit against. A slight reduction in image brightness, around 92%, brings the highlights closer to the page. And a gradient scrim along one edge lets the image fade into the background rather than stopping at a hard line:

.media {
  position: relative;
  border: 1px solid #223A5E;
  border-radius: 14px;
  overflow: hidden;
}

.media img {
  display: block;
  width: 100%;
  filter: brightness(0.92) saturate(1.04);
}

.media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, #0B132B, transparent);
}

The small saturation increase compensates for the brightness reduction, so the image still feels rich rather than merely dimmed.

The violet problem

The violet cast that gives midnight navy its character also creates the family's main difficulty: it clashes with actual purples. Placing beside Midnight Blue makes the navy look like a purple that did not quite arrive. If your palette needs purple, choose a navy from the other end of the hue range instead, such as Oxford Blue #002147, which leans slightly green and therefore contrasts properly with violet.

The same issue appears in print. Violet-leaning navies are among the hardest colours to reproduce consistently in CMYK, because small variations in the magenta plate move them visibly toward purple. If midnight navy is a brand colour destined for print, budget for a spot ink.

Building a midnight scale

Because these colours sit so close to black, a scale needs smaller steps than usual at the dark end and larger steps as it lightens:

:root {
  --midnight-950: #060B1C;
  --midnight-900: #080F26;
  --midnight-800: #0B132B;
  --midnight-700: #0D1B3E;
  --midnight-600: #14213D;
  --midnight-500: #1D2951;
  --midnight-400: #2E2C5F;
  --midnight-300: #4E5180;
  --midnight-200: #8C9EDA;
  --midnight-100: #D6DEEA;
}

Test this ladder on an OLED screen at low brightness, which is where the darkest steps either separate correctly or collapse into an identical black. If steps 950 and 900 look the same on your target hardware, drop one of them rather than shipping a distinction nobody can see.

For the practical side of dark interfaces, read dark navy blue color codes. For the history behind these named colours, Oxford blue vs Prussian blue covers the same territory from the pigment side. Every value here has a full page in the shade collection.

Related guides

About the author

navy blue color code Editorial Team researches and maintains the navy shade library at navy blue color code. Every value published here is derived from its source HEX code rather than transcribed, and articles are reviewed whenever the underlying standards change. Published by navy blue color code. Corrections are welcome at [email protected].

Frequently asked questions

What is the midnight blue color code?

Midnight Blue is #191970, one of the CSS named colours. It is slightly lighter than navy but noticeably more violet.

Why does midnight blue look purple?

Its hue sits at 240 degrees with the red channel raised to 25 while blue drops to 112. That extra red is what tips the colour toward violet.

Is midnight blue darker than navy?

No. Midnight Blue is around 27% lightness and Navy Blue is 25%, so midnight is marginally lighter. It reads as darker because of its violet cast.

What is the best midnight navy for dark mode?

Midnight Navy #0B132B or Eclipse Navy #080F26. Both are low in saturation, which keeps long reading sessions comfortable.

What colours pair with midnight blue?

Warm metallics such as brass and copper, plus off-whites with a warm cast. Avoid purple, which competes directly with the violet already present.