Midnight Blue color codes
| CSS name | midnightblue |
|---|---|
| HEX | #191970 |
| RGB | rgb(25, 25, 112) |
| HSL | hsl(240, 64%, 27%) |
| CMYK | cmyk(78%, 78%, 0%, 56%) |
| Decimal | 1644912 |
Shades of Midnight Blue (darker)
#171765 · #14145A · #12124E · #0F0F43 · #0D0D38 · #0A0A2D · #080822 · #050516 · #03030B
Tints of Midnight Blue (lighter)
#30307E · #47478D · #5E5E9B · #7575A9 · #8C8CB8 · #A3A3C6 · #BABAD4 · #D1D1E2 · #E8E8F1
Color harmonies
| Complementary | #717119 |
|---|---|
| Triadic | #711919, #197119 |
| Analogous | #194571, #451971 |
Accessibility (WCAG contrast)
| White text on Midnight Blue | 14.85:1 · AAA |
|---|---|
| Black text on Midnight Blue | 1.41:1 · Fail |
Use Midnight Blue in code
.element {
color: midnightblue; /* or #191970 */
background-color: rgb(25 25 112 / 0.5);
}Frequently asked questions
What is the hex code for Midnight Blue?
Midnight Blue is #191970 in HEX, rgb(25, 25, 112) in RGB and hsl(240, 64%, 27%) in HSL.
Can I use "midnightblue" directly in CSS?
Yes. "midnightblue" is one of the 148 standard CSS named colors, so color: midnightblue; works in every browser.
Is Midnight Blue readable on white?
The contrast ratio of Midnight Blue on white is 14.85:1 (WCAG AAA). On black it is 1.41:1 (Fail).
What is the complementary color of Midnight Blue?
The complementary color (opposite on the color wheel) is #717119.
Similar colors
Navy#000080Dark Blue#00008BIndigo#4B0082Dark Slate Blue#483D8BDark Slate Gray#2F4F4FDark Slate Grey#2F4F4FRebecca Purple#663399Medium Blue#0000CD
Convert any color with the Color Converter, generate palettes with the Random Color Generator, or browse all 148 CSS color names.