Midnight Blue color #191970
rgb(25, 25, 112) · oklch(28.8% 0.144 272.8)
Midnight Blue (#191970) is a very dark, strong, cool blue. It mixes 10% red, 10% green and 44% blue, with a perceived lightness of 28.8% in OKLCH. White text reads best on it (14.84:1 vs 1.41:1). The closest other CSS color is Navy (#000080). For people with tritanopia it shifts the most, toward #003243.
Midnight Blue color codes
| HEX | |
|---|---|
| RGB | |
| HSL | |
| HSV / HSB | |
| OKLCH | |
| CMYK | |
| CSS keyword |
Click a value to copy it. Convert any other color with the color converter.
Shades, tints and tones of midnight blue
Shades mix midnight blue with black, tints mix it with white, and tones mix it with gray. Mixing happens in OKLab, so the steps look evenly spaced.
Tints (lighter)
Shades (darker)
Tones (muted)
Midnight Blue as a UI color scale (50–950)
An 11-step scale for design systems, with midnight blue placed at step 900. Copy it as a Tailwind v4 theme below.
Colors that go with midnight blue
Harmonies are computed on the OKLCH hue wheel, keeping midnight blue’s lightness and saturation where the sRGB gamut allows. Open any row in the palette generator to adjust it.
Complementary
EditThe base color and the hue directly opposite it. Maximum contrast; use one as the accent.
Split complementary
EditThe base plus the two hues beside its complement (±30°). Contrast with less tension than complementary.
Tetradic (rectangle)
EditTwo complementary pairs (rectangle: 0°, 60°, 180°, 240°). Rich; needs one dominant color.
Is midnight blue accessible? Contrast with white and black
14.84:1
AA pass AA large pass AAA pass
1.41:1
AA fail AA large fail AAA fail
- As a background, midnight blue works best with white text.
- For body text on black, use the lighter variant .
How midnight blue looks with color blindness
Simulated with the Machado et al. (2009) model. Around 1 in 12 men and 1 in 200 women have some form of color vision deficiency.
#002c73 Red-blind. Reds look dark and brownish; red and green are easily confused.
#00236e Green-blind, the most common strong form. Red, green, orange and brown look similar.
#003243 Blue-blind and rare. Blue and green are confused, as are yellow and pink.
#272727 Total color blindness, very rare. Only lightness differences are visible.
Colors similar to midnight blue
The closest CSS named colors by perceptual distance (ΔE OK; under 2 is hard to tell apart).
Use midnight blue in CSS and Tailwind
CSS custom properties
:root {
--midnightblue: #191970;
--midnightblue-rgb: 25 25 112;
}
.text-midnightblue { color: var(--midnightblue); }
.bg-midnightblue { background-color: var(--midnightblue); }
Tailwind v4 theme
@theme {
--color-midnightblue-50: #f6f7f7;
--color-midnightblue-100: #ebedf0;
--color-midnightblue-200: #d6dae8;
--color-midnightblue-300: #b5bfe3;
--color-midnightblue-400: #8b9de4;
--color-midnightblue-500: #677ce5;
--color-midnightblue-600: #4d5ce0;
--color-midnightblue-700: #393eca;
--color-midnightblue-800: #2d3696;
--color-midnightblue-900: #191970;
--color-midnightblue-950: #151c3e;
}
Make a gradient from midnight blue: open the gradient generator.
Painting in Procreate or designing in Photoshop? See our palette packs: every color with HEX codes is free to browse, and the swatch files are a quick download.