Skip to main content

#2D1B4E Midnight

#2D1B4E is Midnight.

#2D1B4E

Midnight

What are the RGB, HSL, OKLCH and CMYK values of #2D1B4E?

HEX
#2D1B4E
RGB
rgb(45, 27, 78)
HSL
hsl(261, 49%, 21%)
OKLCH
oklch(27.6% 0.090 296)
CMYK
42, 65, 0, 69

#2D1B4E has a contrast ratio of 15.24:1 against white and 1.38: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.1. White and near-black text on this color.

WCAG contrast ratio for each text and background color combination
Text ↓ / Bg → #2D1B4E
#2D1B4E
Same color
White
15.2AAA
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 #2D1B4E · 15.2:1

Tints and shades of #2D1B4E

Same hue and chroma in OKLCH, lighter to darker.

  1. #F6F3FF
  2. #D9CDFF
  3. #BCABEA
  4. #9E8DCA
  5. #8170AB
  6. #65558D
  7. #4B3A70
  8. #2D1B4E
  9. #1B0739

Colors that go with #2D1B4E

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, #2D1B4E and Gunmetal, #183444 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: #2D1B4E; /* Midnight */
}

Palettes, gradients and meshes with #2D1B4E

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

Palettes (41)

Gradients (4)

Mesh gradients (8)