Inspect MidnightBlue (#191970) in HEX, RGB, HSL, LCH and OKLCH, check its contrast, and copy the value you need.
MidnightBlue
#191970
White text reads best on this background, at 14.85:1.
MidnightBlue is one of the 148 CSS named colors, and resolves to #191970 in every browser. In numbers that is rgb(25, 25, 112) and hsl(240, 64%, 27%). Perceptually it is a dark, moderately saturated color: OKLCH puts its lightness at 29% and its chroma at 0.144. It sits in the blues at 273 degrees of OKLCH hue, and reads as a cool color.
White text clears WCAG AA on a MidnightBlue background at 14.85:1, and AAA as well. That combination of lightness and chroma makes it a workable mid-tone, the kind of value that lands in the middle of a shade scale.
The closest CSS named colors to MidnightBlue, measured with CIEDE2000, are Navy (#000080), DarkBlue (#00008B), Indigo (#4B0082). If MidnightBlue is not quite right, those are the nearest keywords to try before reaching for a custom value.
HEX
#191970
RGB
rgb(25, 25, 112)
HSL
hsl(240, 64%, 27%)
HWB
hwb(240 10% 56%)
CMYK
cmyk(78%, 78%, 0%, 56%)
LAB
lab(14.93 25.96 -50.9)
LCH
lch(14.93 57.14 297.02)
OKLCH
oklch(28.81% 0.1436 272.76)
WCAG asks for 4.5:1 between body text and its background. On #191970 white text measures 14.85:1 and black text 1.41:1, so white clears it and black does not.
White text on MidnightBlue
WCAG 2.2
14.85:1
APCA
Lc 103
Passes AA body text
Passes AAA body text
Passes AA large text
Black text on MidnightBlue
WCAG 2.2
1.41:1
APCA
Lc 0
Fails AA body text
Fails AAA body text
Fails AA large text
Check MidnightBlue against any other color in the contrast checker.
MidnightBlue sits at 29% OKLCH lightness. Holding its hue and chroma and moving only that value carries it up to #F6F8FF and down to #020023, which keeps the family recognizable instead of letting it drift toward gray the way a plain HSL ramp does.
#37439C
20% lighter
#5B6DC9
40% lighter
#8297F8
60% lighter
#BAC8FF
80% lighter
#F6F8FF
100% lighter
#130C66
20% darker
#0F005A
40% darker
#090047
60% darker
#050034
80% darker
#020023
100% darker
Build a full accessible scale from #191970 in the shade generator.
Hues rotated around #191970 in OKLCH, then pulled back into the sRGB gamut. Each swatch is labelled with the nearest CSS named color so you have a keyword to start from.
MidnightBlue sits at 273 degrees. Rotating it a half turn lands on 93 degrees, the hue directly opposite. It is the strongest pairing you can make without changing lightness, and the one most likely to vibrate if you use both at full chroma.
The neighbors of MidnightBlue at 243 and 303 degrees. They stay close enough to read as the same family, which is what you want for hover states, secondary surfaces and gradients.
273, 33 and 153 degrees divide the wheel into thirds. Balanced enough to carry a whole palette without one color dominating the other two.
Instead of the complement at 93 degrees, this pair flanks it at 63 and 123. You keep most of the contrast of a complementary pairing while losing the harshness.
Explore more combinations around MidnightBlue on the color wheel.
The biggest shift is under achromatopsia, where #191970 reads as #1F1F1F, 25.7 CIEDE2000 units away. If MidnightBlue is the only thing marking a state or a series, roughly one viewer in twelve will miss it.
Protanopia
#072275
Deuteranopia
#051D6D
Tritanopia
#092633
Achromatopsia
#1F1F1F
The nearest CSS keywords to #191970, ranked by perceptual distance rather than by how close their hex digits happen to look.