Skip to content

Midnight blue

Midnight blue is a dark, rich shade of blue. Hex code #191970.

Midnight blue#191970

Midnight blue color codes

  • CSS namemidnightblue
  • HEX#191970
  • RGBrgb(25, 25, 112)
  • HSLhsl(240, 64%, 27%)
  • OKLCHoklch(28.8% 0.144 272.8)
HSB and CMYK values
  • HSB / HSVhsb(240, 78%, 44%)
  • CMYKC78 M78 Y0 K56

White text

14.84:1 · passes WCAG AAA

Black text

1.41:1 · fails WCAG

Shades of midnight blue

A lighter shade of midnight blue is #37449C (600).

Colors that go with midnight blue

Complementary

Analogous

Triadic

The complementary color of midnight blue is #707019, close to dark olive green.

Click a color to copy its hex code.

Colors similar to midnight blue

Each compared with midnight blue.

About this color

Midnight blue in CSS and design

Midnight blue is one of the extended color keywords, which mostly go back to the X11 color names of Unix systems. These four lines all give the same midnight blue:

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

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) and in HSL hsl(240, 64%, 27%). In CMYK it is about C78 M78 Y0 K56, though printed colors vary with paper and ink.

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.

What is the complementary color of midnight blue?

#707019, close to dark olive green. It sits opposite midnight blue on the color wheel: the hue turned 180 degrees, with the same saturation and lightness.

Which colors go with midnight blue?

For strong contrast, pair it with its complementary color #707019. For a calmer look, combine it with its analogous neighbors #194570 and #451970. The palette generator builds more combinations.