CSS named color

MidnightBlue

#191970
HEX#191970
RGBrgb(25, 25, 112)
HSLhsl(240, 64%, 27%)
OKLCHoklch(28.81% 0.1436 272.76)
NAMEmidnightblue

Palette

Complementary

180° on the color wheel
Complement
#717119

Analogous

±30° around the base hue
Left
#194571
Right
#451971

Triadic

±120° for harmonic contrast
Triad 1
#711919
Triad 2
#197119

Shades

Lighter and darker variants
Lightest
#6060DC
Lighter
#2B2BC5
Base
#191970
MidnightBlue
Darker
#06061D
Darkest
#020208

CSS 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.

← All colors & converter