AfoliOpen Afoli →

Midnight color #03012D

Midnight is a color name from the xkcd color survey for the hex code #03012D — RGB 3, 1, 45, HSL 243°, 96%, 9%.

Open in Afoli Colour tools →

#03012DMidnight

Color codes

HEX
#03012D
RGB
rgb(3, 1, 45)
HSL
hsl(243, 96%, 9%)
CMYK
93%, 98%, 0%, 82%
OKLCH
oklch(14.2% 0.088 270.7)

Tints and shades

#F1F5FF#CCD9FF#AABDF9#91A3DE#798AC3#6171A8#4A5A8F#354376#212D5D#0F1746#03022F

Color harmonies

Complementary
#03012D#0E0900
Analogous
#000B16#03012D#100024
Triadic
#03012D#1D0000#000E03
Split complementary
#03012D#140600#080C00
Tetradic
#03012D#1B0008#0E0900#000D0A

Contrast with text

PairWCAG 2.x ratioAPCA LcResult
Midnight text on white20.07 : 1106AAA — any text
Midnight text on black1.05 : 10Fails for text
White text on Midnight20.07 : 1-108AAA — any text
Black text on Midnight1.05 : 10Fails for text

WCAG 2.x needs 4.5 : 1 for body text and 3 : 1 for large text; APCA asks for |Lc| 75 for body text and 60 for large text.

Palettes with this color

Frequently asked questions

What is the hex code of Midnight?

Midnight has the hex code #03012D, which is RGB 3, 1, 45 and HSL 243°, 96%, 9%.

Which text color reads best on Midnight?

White text: contrast 20.07 : 1 (black text: 1.05 : 1).

Which colors go well with Midnight?

Its complementary color is #0E0900; analogous colors are #000B16 and #100024; a triadic set adds #1D0000 and #000E03.

Similar colors

Sources and licences

Updated November 21, 2026