#hexpedia

Closest to Midnight Blue

#000040

Color conversions

Reference values for common CSS, design, and accessibility formats.

FormatValueCopy
HEX000040
HEX with ##000040
RGBrgb(0, 0, 64)
RGBArgba(0, 0, 64, 1)
HSLhsl(240 100% 12.55%)
HSLAhsla(240, 100%, 12.55%, 1)
HSVhsv(240, 100%, 25.1%)
CMYKcmyk(100%, 100%, 0%, 74.9%)
OKLCHoklch(16.79% 0.1164 264.05)

Closest named matches

Color modifications

Suggested pairings

Use this color in CSS

Accessibility quick-check

White text

19.55:1

AAA normal

Black text

1.07:1

Decorative only

Reference notes

Midnight Blue is the nearest readable name for #000040, a saturated blue with very deep value. Its RGB value is 0, 0, 64, while the HSL reading places it around 240 degrees of hue, 100% saturation, and 13% lightness. Its cool temperature makes it easier to place in a palette: warm colors tend to move forward, cool colors tend to recede, and neutral colors depend more heavily on surrounding contrast. For interface work, start with the accessibility table before assigning this color to text, icons, or interactive states; perceived brightness can differ from the raw hex value. Pairing suggestions on this page are generated from hue relationships, so they work as starting points rather than fixed brand or accessibility recommendations. For palette building, start with one strong relationship from the pairing section, then adjust lightness until the hierarchy remains readable at small sizes. It works best in interfaces that need weight, contrast, or a more formal visual register. For stronger contrast, compare it with black and white text and then choose pairings from complementary or split-complementary suggestions.