Swatchproof

Midnight blue #191970

Midnight blue is one of the named colours in CSS, written midnightblue. White text reaches 14.85:1 on it, enough for body text.

Try on walls Preview on a website

Colour codes

CSS keywordmidnightblue
HEX#191970
RGBrgb(25 25 112)
HSLhsl(240 64% 27%)
OKLCHoklch(28.8% 0.144 272.8)
White text14.85:1 · body text AA Pass
Black text1.41:1 · body text AA Fail

Colours that go with Midnight blue

The closest colour in Sanzo Wada's A Dictionary of Color Combinations is Dull Violet Black (#1E0E3F), the nearest, though visibly different. These are the colours Wada paired it with, ranked by their contrast with Midnight blue itself.

ColourHEXContrast with Midnight blueBody text AA
Yellow#FFF20012.69:1Pass
Lemon Yellow#F8ED4312.15:1Pass
Apricot Yellow#FFDD0011.03:1Pass
Cream Yellow#FDBF689.07:1Pass
Light Green Yellow#C7D14F8.95:1Pass
Citron Yellow#B2B73E6.88:1Pass
Olive Yellow#A6A1595.56:1Pass
Spinel Red#F272915.37:1Pass
Old Rose#D46D7A4.43:1Fail
Light Mauve#9A72AA3.79:1Fail
Olive#837E313.53:1Fail
Indian Lake#C53C692.99:1Fail
Rosolanc Purple#B73F742.81:1Fail
Blue#006EB82.77:1Fail
Antwarp Blue#0071902.66:1Fail
Brown#7C42261.88:1Fail
Violet#4F40861.70:1Fail
Hay's Russet#7933271.64:1Fail
Violet Blue#40456A1.61:1Fail

Palettes with Dull Violet Black

Shades and tints of Midnight blue

Nine lightness steps in OKLCH that keep the hue of Midnight blue. Chroma is reduced only where sRGB cannot show it.

:root {
  --midnightblue-100: #F2F5FF;
  --midnightblue-200: #DCE4FF;
  --midnightblue-300: #BDCBFF;
  --midnightblue-400: #97ABFF;
  --midnightblue-500: #758AE9;
  --midnightblue-600: #5768C4;
  --midnightblue-700: #3D4AA3;
  --midnightblue-800: #252D83;
  --midnightblue-900: #130A64;
}

Text that keeps Midnight blue on screen

Text #191970 on #F2F5FF reaches 13.63:1, which passes WCAG AA for body text. Check it on a dashboard

Similar CSS colours