Midnight Blue Color Code (#191970)

Midnight Blue is #191970 in hex and rgb(25, 25, 112) — a dark blue. Below: every color format, tints and shades, harmonies and how readable it is as text.

Updated

Midnight Blue
#191970
CSS namemidnightblue
Hex#191970
RGBrgb(25, 25, 112)
HSLhsl(240 64% 27%)
HWBhwb(240 10% 56%)
CMYK78%, 78%, 0%, 56%

Tints and shades

Color harmonies

About Midnight Blue

Midnight Blue (midnightblue) is a dark, vivid blue with the hex code #191970, or rgb(25, 25, 112). In HSL it sits at a hue of 240°, 64% saturation and 27% lightness. It is one of the 148 named colors every browser understands, so you can write color: midnightblue; instead of the hex value.

Using Midnight Blue for text and backgrounds

PairingContrast ratioWCAG
Midnight Blue text on white14.85 : 1AAA
Midnight Blue text on black1.41 : 1fails

On a midnight blue background, use white text (14.85 : 1). WCAG asks for at least 4.5 : 1 for body text and 3 : 1 for large text. Check other pairs with the Contrast Checker.

CSS

.element {
  color: midnightblue;               /* or #191970 */
  background-color: #191970;
  border: 1px solid rgb(25 25 112 / 50%);
}

Similar named colors

Navy (#000080), Dark Blue (#00008b), Indigo (#4b0082), Dark Slate Blue (#483d8b), Dark Slate Gray (#2f4f4f), Rebecca Purple (#663399).

Color Name FinderPaste a HEX code to get its closest human-readable name and clean token names for your CSS, SCSS, JavaScript or Tailwind config.
Open the tool

Frequently asked questions

What is the hex code for midnight blue?
#191970 — that is rgb(25, 25, 112) and hsl(240, 64%, 27%). In CSS you can also just write midnightblue.
Is midnight blue text readable on white?
Its contrast ratio on white is 14.85 : 1, which passes WCAG AA for normal text.
What colors go well with midnight blue?
Its complementary color is #717119; analogous colors #194571 and #451971 sit next to it on the color wheel.