Skip to content
Color Codes

CSS named color

MidnightBlue Color Code

MidnightBlue is a dark, moderately saturated blue with the hex code #191970. In RGB it is rgb(25, 25, 112), in HSL hsl(240, 64%, 27%) and in CMYK cmyk(78%, 78%, 0%, 56%).

MidnightBlue
#191970

Color values

In CSS you can write it as the keyword midnightblue.

White text on MidnightBlue has a contrast ratio of 14.85:1 and black text 1.41:1, so white text is the more readable choice.

The closest Tailwind CSS color is Indigo 900 (#312E81).

Use MidnightBlue in CSS

.element {
  color: midnightblue;
  background-color: #191970;
  border-color: rgb(25, 25, 112);
}

Tints and shades of MidnightBlue

Ten steps from light to dark at the same hue. Click any swatch to copy it.

Colors that go with MidnightBlue

Color-wheel harmonies built from #191970. Click a swatch to copy it or open the set in the color wheel.

Complementary

Open in color wheel

Opposite hues for maximum contrast and energetic accents.

Neighboring hues for calm, cohesive surfaces.

Three evenly spaced hues for balanced, colorful systems.

Split complementary

Open in color wheel

A base plus the two neighbors of its complement — contrast with less tension.

Text contrast on MidnightBlue

Aa
White text
14.85:1
AAA
Aa
Black text
1.41:1
Fail
Check in the contrast checker

Colors similar to MidnightBlue

Palettes with similar colors

Questions about MidnightBlue

What is the hex code for MidnightBlue?

The hex code for MidnightBlue is #191970. Its RGB value is rgb(25, 25, 112) and its HSL value is hsl(240, 64%, 27%).

What colors go with MidnightBlue?

The complementary color of MidnightBlue is #717119. For a softer scheme try the analogous colors #194571 and #451971; for a balanced three-color scheme use the triadic colors #711919 and #197119.

Is MidnightBlue readable as a text color?

On a white background MidnightBlue has a contrast ratio of 14.85:1, which passes WCAG AA for normal text (4.5:1). On black it reaches 1.41:1.

More blue colors