Midnight Blue #191970

Midnight Blue color (#191970)

Midnight Blue is one of the 148 CSS named colors. Use the keyword midnightblue anywhere CSS accepts a color, or its hex code #191970, which is rgb(25, 25, 112) in RGB.

It is a very dark, vivid cool color with a hue angle of 240° on the HSL color wheel and a perceived lightness of 29% in OKLCH. On a midnight blue background, white text gives the higher contrast at 14.84:1, which passes WCAG AA for normal text.

Midnight Blue color codes

CSS name midnightblue
HEX #191970
HEX (8-digit) #191970FF
RGB rgb(25, 25, 112)
HSL hsl(240, 64%, 27%)
HSV / HSB hsv(240, 78%, 44%)
OKLCH oklch(28.8% 0.1436 272.8)
CMYK cmyk(77.7%, 77.7%, 0%, 56.1%)

Contrast with white and black

WCAG 2 contrast ratios and APCA lightness contrast (Lc) for midnight blue used as text and as a background.

Aa Sample text
Midnight Blue text on white
14.84:1 WCAG Lc 101 APCA Passes AA
Aa Sample text
Midnight Blue text on black
1.41:1 WCAG Lc 0 APCA Fails AA
Aa Sample text
White text on midnight blue
14.84:1 WCAG Lc -104 APCA Passes AA
Aa Sample text
Black text on midnight blue
1.41:1 WCAG Lc 0 APCA Fails AA

Tints and shades of midnight blue

Tints mix midnight blue with white; shades mix it with black, in 10% steps. Click a swatch to copy it, or build custom scales in the tint & shade generator.

Tints

Shades

Colors that go with midnight blue

Harmonies calculated on the HSL color wheel. Explore more in the color scheme generator.

Complementary

Analogous

Triadic

Split-Complementary

Midnight Blue with color blindness

Approximately how midnight blue appears with each type of color vision deficiency. Test full designs with the color blindness simulator.

Using midnight blue in CSS

.element {
  color: midnightblue;
  background-color: #191970;
  border-color: rgb(25 25 112 / 50%);
  outline-color: oklch(28.8% 0.1436 272.8);
}

Similar named colors

See all shades of blue or browse every CSS color name.

Related tools