AfoliOpen Afoli →

Midnight Purple color #280137

Midnight Purple is a color name from the xkcd color survey for the hex code #280137 — RGB 40, 1, 55, HSL 283°, 96%, 11%.

Open in Afoli Colour tools →

#280137Midnight Purple

Color codes

HEX
#280137
RGB
rgb(40, 1, 55)
HSL
hsl(283, 96%, 11%)
CMYK
27%, 98%, 0%, 78%
OKLCH
oklch(20.9% 0.101 314.2)

Tints and shades

#FBF1FF#EECBFF#D8ACED#BD93D2#A37AB8#8A629E#724A84#5A346C#431D54#2E063D#160021

Color harmonies

Complementary
#280137#0B1E00
Analogous
#160943#280137#310022
Triadic
#280137#241400#001D1D
Split complementary
#280137#1C1900#001E12
Tetradic
#280137#2E0C00#0B1E00#001C26

Contrast with text

PairWCAG 2.x ratioAPCA LcResult
Midnight Purple text on white18.27 : 1104AAA — any text
Midnight Purple text on black1.15 : 10Fails for text
White text on Midnight Purple18.27 : 1-107AAA — any text
Black text on Midnight Purple1.15 : 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 Purple?

Midnight Purple has the hex code #280137, which is RGB 40, 1, 55 and HSL 283°, 96%, 11%.

Which text color reads best on Midnight Purple?

White text: contrast 18.27 : 1 (black text: 1.15 : 1).

Which colors go well with Midnight Purple?

Its complementary color is #0B1E00; analogous colors are #160943 and #310022; a triadic set adds #241400 and #001D1D.

Similar colors

Sources and licences

Updated November 21, 2026