Midnight blue

#040f4d

Hex, rgb, cmyk and Pantone values for midnight blue, with shades, tints, matching colors and free print quality patterns.

This is Midnight blue, a vivid blue at 231 degrees. Near navy blues this dark carry authority in print. Warm oranges and ambers opposite it add energy and grey keeps it professional.

Midnight blue color values

Every conversion for #040f4d, ready to copy. Hex, rgb, hsl, hsv, cmyk, cie-lab, xyz, decimal, web safe and the nearest Pantone.

Hex#040f4d
RGB4, 15, 77
HSL231, 90%, 16%
HSV231, 95%, 30%
CMYK95%, 81%, 0%, 70%
Lab8.16, 22.95, -38.9
XYZ1.56, 0.9, 7.11
Decimal266061
Web safe#000066
Pantone2757 C
Pantone2757 CHex#040f4dRgb4 15 77Cmyk95 81 0 70Lab8 23 -39Darker#030b3aLighter#0e218a

Shades of midnight blue

Tints of midnight blue

Colors that go with midnight blue

Midnight blue in print

At this depth the ink coverage is heavy, worth a proof before a long run. The cmyk build is 95, 81, 0, 70.

The same color needs a different cmyk build depending on the paper. Here is #040f4d on both.

Coated stockgloss or silk, C
95 81 0 70
Ink sits on the surface, so colors stay bright and close to screen.
Uncoated stocknatural or matte, U
91 79 4 76
The stock absorbs ink and gains dot, so it needs a heavier build and reads a touch softer.

This color converts to cmyk comfortably and should hold on press.

See how it converts in the rgb to cmyk converter, or read rgb vs cmyk for print and what the k in cmyk means.

Midnight blue in css

Copy #040f4d straight into your stylesheet.

.background { background-color: #040f4d; }
.text { color: #040f4d; }
.border { border: 2px solid #040f4d; }

How midnight blue looks on light and dark

Midnight blue and accessibility

Contrast ratios for #040f4d against black and white text, measured to the WCAG standard.

Textwhite text on this color
17.79:1
AA pass · AA large pass · AAA pass
Textblack text on this color
1.18:1
AA fail · AA large fail · AAA fail

Use white text on this color for readable body copy. To test #040f4d against any other color, not just black and white, run the pair through our contrast checker for a live WCAG reading.

Midnight blue on a business card, sticker and pattern

A quick look at how #040f4d sits on real print products. Start any of these in the maker.

Your nameFounderhello@brand.comBusiness card
Sticker
Repeat pattern

Building a full palette around midnight blue? Pull matching colors from any photo with the color palette generator, or check a design for print with the rgb to cmyk converter.

Turn midnight blue into a seamless pattern

Four patterns built from #040f4d and its shades, free at print quality. Click any one to keep editing in the pattern maker.

Make posters, wallpaper and packaging art from midnight blue, free and print ready.

Open in pattern maker

How we calculate these values

Here is how the numbers for #040f4d are worked out. We convert from sRGB to each space with the standard formulas, so the codes match what design tools show. The coated and uncoated cmyk builds differ because uncoated stock absorbs more ink and gains dot, so the same color needs a heavier, slightly duller build on press. For Pantone we return the nearest reference by perceptual distance, which gets you close but is not a substitute for a physical swatch book.