midnightblue — #191970
#191970
rgb(25, 25, 112) · hsl(240, 64%, 27%) · CSS keyword midnightblue
Can you put text on it?
| Contrast | Body text | Large text | |
|---|---|---|---|
| midnightblue on white | 14.85:1 | AA | AA |
| midnightblue on black | 1.41:1 | — | — |
As a background, midnightblue takes white text: 14.85:1 against 1.41:1 the other way. A colour picker will give you the hex and stop there, which is why so many palettes look right and fail an accessibility audit.
Using it
color: midnightblue;
color: #191970;
color: rgb(25 25 112);
All three are the same colour. The keyword is one of the 141 CSS named colours — a list settled in CSS 2.1 and added to exactly once since, when rebeccapurple was standardised in 2014.
Colours close to midnightblue
- navy — #000080
- darkblue — #00008B
- indigo — #4B0082
- darkslateblue — #483D8B
- mediumblue — #0000CD
- black — #000000
Frequently asked questions
What is the hex code for midnightblue?
The hex code for midnightblue is #191970 — RGB 25, 25, 112.
Can I use midnightblue for text?
Yes. midnightblue reaches 14.85:1 against white, past the 4.5:1 that WCAG AA asks for body text.
Should text on midnightblue be black or white?
White — 14.85:1 against 1.41:1 the other way.
Other named colours
- mintcream — #F5FFFA
- mistyrose — #FFE4E1
- moccasin — #FFE4B5
- navajowhite — #FFDEAD
- navy — #000080
- oldlace — #FDF5E6
- olive — #808000
- olivedrab — #6B8E23
- orange — #FFA500
- orangered — #FF4500
- orchid — #DA70D6
- palegoldenrod — #EEE8AA
#191970 in full — tints, shades and harmonies · All named colours · Colour reference