Find Color Codes

Midnight Blue Color Codes

Midnight Blue is a very dark, saturated blue with the hex code #191970, RGB values of 25, 25, 112 and an HSL value of hsl(240, 64%, 27%).

HEX#191970
RGB25, 25, 112
HSLhsl(240, 64%, 27%)
HSV240°, 78%, 44%
CMYK78%, 78%, 0%, 56%
LAB15.86, 31.71, -49.57
CIELCHuv15.86, 49.43, 265.87°
Nearest Pantone
PMS 2747 C ΔE 2.3 · approximate
Nearest CSS name
midnightblue ΔE 0.0

Source CSS Color Module Level 4 keyword 'MidnightBlue'

Midnight Blue Color Hex Code

The Midnight Blue color hex code is #191970. Those six digits are three pairs, 19 for red, 19 for green and 70 for blue, which is the same triplet a browser reads from the CSS value below.

#191970

Midnight Blue Color RGB Code

The Midnight Blue RGB code is rgb(25, 25, 112). Blue carries the most light at 112 of 255, which is what puts this color where it sits on the wheel.

rgb(25, 25, 112)

Midnight Blue Color HSV Code

The Midnight Blue HSV code is 240°, 78%, 44%. Read it as a hue of 240 degrees, 78% saturation and 44% value, which is the form most color pickers use because moving one number changes one thing.

240°, 78%, 44%

Midnight Blue Color CIELChuv Code

The Midnight Blue CIELCHuv code is 15.86, 49.43, 265.87°. Unlike hex or RGB this one is perceptual: lightness 16 means dark to the eye rather than to the screen, and chroma 49 is how far it sits from grey.

15.86, 49.43, 265.87°

Tonal scale

What are Midnight Blue Color Palettes?

A shade mixes toward black, a tint toward white, a tone toward grey. Every step keeps the hue and is copy-ready.

Shades, toward black

Tints, toward white

Tones, toward grey

Open in the shades & tints generator →

Palettes

What are Midnight Blue Color Palette Codes?

Each of these is a hue rotation from #191970. They are generated, not curated, so they are exact.

Complementary

The opposite hue is #707019, a mid-tone, saturated yellow. Complements carry the strongest contrast of any two-color scheme, so this pair suits a call to action better than a background. Neither is especially saturated, so this pairing stays calm enough for large areas of both.

Analogous

Its two neighbours are #194470 and #451970. Because they overlap heavily in hue, nothing in the group competes, and the eye reads the whole set as a single color with variation.

Triadic

#701919 and #197019 complete an even 120 degree split. Three fully independent hues, so one has to lead: keep this base dominant and let the other two appear in small quantities.

Split-complementary

Instead of the direct complement, this takes the two hues either side of it: #704519 and #457019. Almost the same contrast, without the edge shimmer a true complementary pair produces at high saturation.

Tetradic

Two complementary pairs forming a rectangle: this base with #707019, and #701945 with #197045. The richest of the five and the hardest to balance, so treat this base as the lead and hold the other three well back.

See these on the color wheel →

Accessibility

Contrast checker: is Midnight Blue accessible?

Measured against white and against black, with a separate verdict for each element type. Small text, large text and UI components have different thresholds, so one pass or fail for the whole color would be wrong roughly a third of the time.

White background

14.85:1

14.85

contrast ratio on white background

ElementAAAAA
Small text needs 4.5:1 / 7:1 Passes Passes
Large text needs 3:1 / 4.5:1 Passes Passes
UI component needs 3:1 Passes n/a

Black background

1.41:1

1.41

contrast ratio on black background

ElementAAAAA
Small text needs 4.5:1 / 7:1 Fails Fails
Large text needs 3:1 / 4.5:1 Fails Fails
UI component needs 3:1 Fails n/a

Midnight Blue clears WCAG AA against white at 14.85:1, so it is safe for body copy as well as headings. Text placed on it should be white, which gives 14.85:1.

Color vision

How Midnight Blue looks with color blindness

Around 300 million people see color differently from the way it is specified. Each card shows the actual color beside how it appears, and how common that form of vision is.

Protanopia

About 1% of men
actual

#191963

Midnight Blue shifts slightly here. ΔE 7.9

No working red cones. Reds darken sharply and drift toward the same muddy olive as green.

Deuteranopia

About 1% of men
actual

#191960

Midnight Blue shifts slightly here. ΔE 9.8

No working green cones. With the milder deuteranomaly at nearer 6% of men, this is by far the most common form, and the one worth designing around.

Tritanopia

About 1 in 10,000
actual

#195754

Midnight Blue changes substantially here. ΔE 71.1

No working blue cones. Blues shift toward green and yellows toward pink. Rare, and unlike the others it is not sex-linked, so it affects men and women equally.

Achromatopsia

About 1 in 30,000
actual

#272727

Midnight Blue changes substantially here. ΔE 58.9

No color vision at all. Also a fair proxy for how the color survives a greyscale print or a failing screen.

To a deuteranope, the most common form, Midnight Blue reads as #191960. That is a shift of ΔE 9.8, so it is a different color to roughly one man in sixteen. Blues survive red-green deficiency well, which is why so much interface design leans on them. The form to watch here is tritanopia, though at roughly 1 in 10,000 it affects far fewer people. The widest shift is under tritanopia, at ΔE 71.1. The rule this leads to needs no simulator: never let color be the only thing carrying a message. Add a label, an icon, or a clear difference in lightness, and the problem disappears for everyone.

Snippets

Using Midnight Blue in code

:root {
  --midnight-blue: #191970;
}

.example {
  color: var(--midnight-blue);
}