Midnight Blue color code: #191970
A named CSS colour with an unmistakable violet lean, historically used for night skies in illustration.
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 textBlack text on Midnight Blue
The quick brown fox jumps over the lazy dog.
1.41:1 — below AA, decorative use onlyMidnight Blue text on white
The quick brown fox jumps over the lazy dog.
14.85:1 — AAA for normal textAccessibility 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.
Similar navy shades
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.