A vivid very dark indigo, white text passes AA

What color is midnightblue?

midnightblue is a vivid very dark indigo: #191970 in hex, rgb(25 25 112). White text on it reaches 14.85:1, passing WCAG AAA. Recolor (recolor.page) shows it on a real page below.

Last updated

#191970midnightblue
The keyword's value in CSS Color 4 (culori's list of named colors), converted with Recolor's color code, October 9, 2026
FormatValue
Keywordmidnightblue
Hex#191970
RGBrgb(25 25 112)
HSLhsl(240 64% 27%)
OKLCHoklch(28.8% 0.144 272.8)
Nearest Tailwind colorviolet-950 #2f0d68, 0.046 away in OKLab
White text14.85:1: AA passes, AAA passes, large text passes
Black text1.41:1: AA fails, AAA fails, large text fails

About midnightblue

Measured in OKLCH, midnightblue comes out at lightness 28.8%, chroma 0.144 and hue 272.8 degrees: a vivid very dark indigo.

HSL and OKLCH agree on how light it is, 27% and 28.8%. The nearest CSS named color, navy (#000080), is 0.054 away in OKLab: related, but plainly a different color.

White on midnightblue reads at 14.85:1, enough for AAA body text; black reaches 1.41:1 and should stay off it. In the hue-sorted table of named colors it sits between darkslateblue and mediumpurple.

In Tailwind CSS 4.3.3 the nearest default color is violet-950 (#2f0d68), 0.046 away in OKLab; for the exact color, an arbitrary value such as bg-[#191970] works.

Tints and shades

  1. #d2d7e8
  2. #a7b1d1
  3. #7e8bba
  4. #5866a2
  5. #354189
  6. #191970
  7. #111156
  8. #09093e
  9. #040427
  10. #010112
  11. #000002

From light to dark: 5 toward white and 5 toward black, mixed in OKLCH a sixth of the way at a time with the hue kept. A step that would repeat its neighbor is left out.

A palette around it

  1. #191970
  2. #a29057
  3. #e2e7fd
  4. #464a81
  5. #bdc4dd

Around midnightblue as swatch 1, Recolor's generator made a complementary palette, built on the hue opposite: #a29057, #e2e7fd, #464a81, #bdc4dd, drawn from a seed fixed by its hex. Open it in Recolor.

Using midnightblue

As a text color, midnightblue on a white page gives the same 14.85:1.

CSS
.notice {
  background-color: midnightblue; /* #191970 */
  color: white; /* 14.85:1 */
}

Common questions

Does white text pass WCAG AA on midnightblue?

Yes. White text measures 14.85:1 on midnightblue, above the 4.5:1 that WCAG AA asks of body text, and above AAA's 7:1 too.

Can midnightblue be written in OKLCH?

Yes: oklch(28.8% 0.144 272.8), computed from #191970. A named color is an sRGB color, so its OKLCH value converts back to the same hex.

Is there a named color close to midnightblue?

No. The nearest, navy (#000080), is 0.054 away in OKLab, a different color.

Sources