CSS named color
MidnightBlue
#191970
HEX
#191970RGB
rgb(25, 25, 112)HSL
hsl(240, 64%, 27%)OKLCH
oklch(28.81% 0.1436 272.76)NAME
midnightbluePalette
Complementary
180° on the color wheelComplement
#717119
Analogous
±30° around the base hueLeft
#194571
Right
#451971
Triadic
±120° for harmonic contrastTriad 1
#711919
Triad 2
#197119
Shades
Lighter and darker variantsCSS usage
By name
color: midnightblue;
background-color: midnightblue;By HEX
color: #191970;
background-color: #191970;By RGB
color: rgb(25, 25, 112);
background-color: rgb(25, 25, 112);By HSL
color: hsl(240, 64%, 27%);
background-color: hsl(240, 64%, 27%);WCAG contrast vs white
Aa
14.85:1
AAA
WCAG contrast vs black
Aa
1.41:1
Below minimum
Related colors
FAQ — MidnightBlue
What is the HEX code for MidnightBlue?
The HEX code for MidnightBlue is #191970. It's one of the 148 named CSS colors and can be used directly in CSS as color: midnightblue; or color: #191970;
What is MidnightBlue in RGB?
MidnightBlue in RGB is rgb(25, 25, 112) — red 25, green 25, blue 112.
What is MidnightBlue in HSL?
MidnightBlue in HSL is hsl(240, 64%, 27%) — hue 240°, saturation 64%, lightness 27%.
What is the complementary color of MidnightBlue?
The complementary color (directly opposite MidnightBlue on the color wheel) is #717119. The two together produce maximum contrast.
Is white text readable on MidnightBlue?
The WCAG contrast ratio against white (#FFFFFF) is 14.85:1, and against black (#000000) it's 1.41:1. White text is more readable. WCAG recommends at least 4.5:1 for body text.