Skip to content

Midnight blue

Midnight blue is a dark, rich color from the blue family. Hex code #191970.

Midnight blue#191970

Color codes

  • CSS namemidnightblue
  • HEX#191970
  • RGBrgb(25 25 112)
  • HSLhsl(240 64% 27%)
  • HSB / HSVhsb(240, 78%, 44%)
  • OKLCHoklch(28.8% 0.144 272.8)
  • CMYKcmyk(78%, 78%, 0%, 56%)

White text

14.84:1 · passes WCAG AAA

Black text

1.41:1 · fails WCAG

Shades

50#EEF1FE
100#C7D3FE
200#A2B4FC
300#7F94F5
400#6679D7
500#4E5EB9
600#37449C
700#232980
800#130A64

Complementary

#191970
#342A03

Analogous

#191970
#012E4A
#3A0663

Triadic

#191970
#530C01
#063419

About this color

Midnight blue in CSS and design

Midnight blue is a dark, rich color from the blue family. Midnight blue is one of the extended color keywords, which CSS adopted from the X11 color names used on Unix workstations.

Use it in CSS by name or by any of its codes; these all give the same color:

color: midnightblue;
color: #191970;
color: rgb(25 25 112);
color: hsl(240 64% 27%);

For text on midnight blue, white reads best. Check other combinations with the contrast checker, or browse all CSS color names.

Frequently asked questions

What is the hex code for midnight blue?

#191970. In CSS you can also use the keyword midnightblue, which works in every browser.

What is midnight blue in RGB and HSL?

In RGB it is rgb(25 25 112), in HSL hsl(240 64% 27%). For print, cmyk(78%, 78%, 0%, 56%) is a starting point, but CMYK depends on paper and ink, so check with your printer.

Should I use black or white text on midnight blue?

White text works better: it has a contrast ratio of 14.84:1 and passes WCAG AAA. Black text reaches 1.41:1.

Which colors go with midnight blue?

Its complementary color is #342A03, on the opposite side of the color wheel. For a calmer look, combine it with its analogous neighbors #012E4A and #3A0663. The palette generator builds more combinations.