Skip to main content

#1D0040 Midnight

The nearest named color to #1D0040 is Midnight (#1E1B4B).

#1D0040

Midnight

What are the RGB, HSL, OKLCH and CMYK values of #1D0040?

HEX
#1D0040
RGB
rgb(29, 0, 64)
HSL
hsl(267, 100%, 13%)
OKLCH
oklch(20.0% 0.109 296)
CMYK
55, 100, 0, 75

#1D0040 has a contrast ratio of 18.65:1 against white and 1.13:1 against black, so white is the better background for text in this color and light text reads best on it.

Contrast checker

Text color (rows) on background (columns), scored against WCAG 2.2. White and near-black text on this color.

WCAG contrast ratio for each text and background color combination
Text ↓ / Bg → #1D0040
#1D0040
Same color
White
18.6AAA
Near-black
1.1Fail

AAA ≥ 7:1 · AA ≥ 4.5:1 body text· AA18 ≥ 3:1 large text (18pt, or 14pt bold) only

Text that works on each color

  • White on #1D0040 · 18.6:1

Tints and shades of #1D0040

Same hue and chroma in OKLCH, lighter to darker.

  1. #F6F3FF
  2. #D9CDFF
  3. #BDA8F5
  4. #9F8AD4
  5. #826DB5
  6. #665196
  7. #4C3679
  8. #331C5C
  9. #1D0040

Colors that go with #1D0040

Six harmony rules built from this color. Open any in the Studio.

Color blindness check

About 1 in 12 men and 1 in 200 women see color differently. Simulated with the Machado (2009) model.

Typical
Deuteranopia

No green cones — the most common form. Midnight, #1D0040 and Midnight Blue, #00045C; Purple, #640069 and Prussian Blue, #00325C; Midnight Blue, #00045C and Prussian Blue, #00325C become hard to tell apart — don't rely on color alone to separate them.

Export

Copy-paste code, or download the swatches.

:root {
  --midnight-1: #1D0040; /* Midnight */
}

Palettes, gradients and meshes with #1D0040

Items using this color or one perceptually close to it, closest first.

Palettes (17)

Gradients (2)

Mesh gradients (5)