Midnight Blue color code: #191970

A named CSS colour with an unmistakable violet lean, historically used for night skies in illustration.

Midnight Navy
#191970

Midnight Blue · rgb(25, 25, 112)

Every format for Midnight Blue

HEX
#191970
RGB
rgb(25, 25, 112)
HSL
hsl(240, 64%, 27%)
HSV
240°, 78%, 44%
CMYK
78%, 78%, 0%, 56%
Lightness
27% · dark

Hue sits at 240°, which makes Midnight Blue a true blue navy, with 64% saturation. In the Midnight Navy family it reads as a dark option.

Text contrast on Midnight Blue

Contrast ratios are calculated using the WCAG 2.1 relative luminance formula. Normal body text needs 4.5:1 and large text needs 3:1 to pass AA.

White text on Midnight Blue

The quick brown fox jumps over the lazy dog.

14.85:1 — AAA for normal text

Black text on Midnight Blue

The quick brown fox jumps over the lazy dog.

1.41:1 — below AA, decorative use only

Midnight Blue text on white

The quick brown fox jumps over the lazy dog.

14.85:1 — AAA for normal text

Accessibility notes

  • Pair Midnight Blue with white text for the strongest reading experience: that combination gives 14.85:1.
  • Used as a text colour on white, it clears the 3:1 bar for large headings.
  • Never rely on Midnight Blue alone to communicate state. Add an icon, label or underline so the meaning survives for colour-blind users and in greyscale printing.
  • When placing text over a photograph tinted with Midnight Blue, add a solid overlay first. Contrast measured against a flat colour does not hold over varying imagery.

Using Midnight Blue in CSS and HTML

CSS example

:root {
  --midnight-blue: #191970;
}

.panel {
  background-color: var(--midnight-blue);
  color: #FFFFFF;
  border: 1px solid #191970;
}

HTML example

<div style="background-color: #191970; color: #FFFFFF; padding: 1rem;">
  Midnight Blue #191970
</div>

Common uses

  • Page and section backgrounds in dark interfaces, where it holds white text cleanly.
  • Midnight Navy palettes for brand systems that need a dependable cool anchor.
  • Print work where a deep blue is preferred to black, using the CMYK build 78%, 78%, 0%, 56%.
  • Data visualisation, as one step in a lightness-based navy scale.

Design recommendations

  • Build lighter and darker variants by changing only the lightness in hsl(240, 64%, 27%). Keeping hue fixed is what makes a scale look intentional.
  • Give Midnight Blue at least one warm counterweight. A cool palette with no warm accent tends to read as cold rather than calm.
  • Saturation is moderate, which makes this shade forgiving across large areas and long reading sessions.

Complementary and matching colors

Each of these is derived from the hue, saturation and lightness of Midnight Blue. Click a swatch to copy it.

Complementary #BCBC29
Split complement #BC7329
Warm accent #B4E12D
Analogous cool #2D7DCD
Analogous warm #7D2DCD
Triadic #A32424

Similar navy shades

Space Cadet

Midnight Navy

HEX
#1D2951
RGB
29, 41, 81
HSL
226, 47%, 22%
CMYK
64%, 49%, 0%, 68%

Sapphire Night

Midnight Navy

HEX
#0D1B3E
RGB
13, 27, 62
HSL
223, 65%, 15%
CMYK
79%, 56%, 0%, 76%

Charcoal Navy

Midnight Navy

HEX
#1C2331
RGB
28, 35, 49
HSL
220, 27%, 15%
CMYK
43%, 29%, 0%, 81%

Obsidian Blue

Midnight Navy

HEX
#10182B
RGB
16, 24, 43
HSL
222, 46%, 12%
CMYK
63%, 44%, 0%, 83%

Deep Sea Navy

Midnight Navy

HEX
#04203A
RGB
4, 32, 58
HSL
209, 87%, 12%
CMYK
93%, 45%, 0%, 77%

Midnight Navy

Midnight Navy

HEX
#0B132B
RGB
11, 19, 43
HSL
225, 59%, 11%
CMYK
74%, 56%, 0%, 83%

Continue exploring

FAQs about Midnight Blue

What is the Midnight Blue color code?

The Midnight Blue color code is #191970 in HEX, rgb(25, 25, 112) in RGB and hsl(240, 64%, 27%) in HSL.

What is the RGB value of Midnight Blue?

Midnight Blue is rgb(25, 25, 112), meaning 25 units of red, 25 of green and 112 of blue on the 0 to 255 scale.

What is the CMYK value of Midnight Blue?

In CMYK, Midnight Blue converts to approximately 78%, 78%, 0%, 56%. Printed output will look slightly less saturated than the screen preview because CMYK covers a narrower gamut.

Does white text work on Midnight Blue?

White text on Midnight Blue gives a contrast ratio of 14.85:1, which is AAA for normal text.

Does black text work on Midnight Blue?

Black text on Midnight Blue gives a contrast ratio of 1.41:1, which is below AA, decorative use only.

Which colors go with Midnight Blue?

Its direct complement is #BCBC29, and the warm accent #B4E12D works well for calls to action. For a quieter scheme, pair it with the analogous blues listed above.

Is Midnight Blue a light or dark navy?

At 27% lightness, Midnight Blue is classed as a dark navy in this collection.