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
| Format | Value |
|---|---|
| Keyword | midnightblue |
| Hex | #191970 |
| RGB | rgb(25 25 112) |
| HSL | hsl(240 64% 27%) |
| OKLCH | oklch(28.8% 0.144 272.8) |
| Nearest Tailwind color | violet-950 #2f0d68, 0.046 away in OKLab |
| White text | 14.85:1: AA passes, AAA passes, large text passes |
| Black text | 1.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
- #d2d7e8
- #a7b1d1
- #7e8bba
- #5866a2
- #354189
- #191970
- #111156
- #09093e
- #040427
- #010112
- #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
- #191970
- #a29057
- #e2e7fd
- #464a81
- #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.
.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.