Midnight Library

Export

Code

/* Midnight Library — colorset.net */
:root {
  --color-1: #04070F;
  --color-2: #0D1321;
  --color-3: #1B273A;
  --color-4: #9F7932;
  --color-5: #D4C9B5;

  --color-bg: #FAF6F0;
  --color-surface: #F0EDE7;
  --color-border: #D9D4CB;
  --color-text: #04070F;
  --color-muted: #595F6B;
  --color-primary: #967028;
  --color-on-primary: #FFFFFF;
  --color-accent: #0D1321;
  --color-on-accent: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #04070F;
    --color-surface: #0C1019;
    --color-border: #1D2430;
    --color-text: #D4C9B5;
    --color-muted: #867C6A;
    --color-primary: #967028;
    --color-on-primary: #FFFFFF;
    --color-accent: #5A606C;
    --color-on-accent: #FFFFFF;
  }
}

Color values

ColorHEXRGBHSLOKLCH
1
2
3
4
5

Roles & contrast

Original colors are kept; roles are adjusted only when needed for contrast.

RoleLight modeDark mode
Backgroundadjusted for contrast · from #D4C9B5from palette · color 1
Surfacederivedderived
Borderderivedderived
Textfrom palette · color 1from palette · color 5
Muted textderivedderived
Primaryadjusted for contrast · from #9F7932adjusted for contrast · from #9F7932
On primaryderivedderived
Accentfrom palette · color 2adjusted for contrast · from #9F7932
On accentderivedderived

Contrast

Light mode
PairSampleRatioWCAG
Text on background18.71:1AAA pass 4.5:1
Text on surface17.24:1AAA pass 4.5:1
Muted text on background5.96:1AA pass 4.5:1
Label on primary4.52:1AA pass 4.5:1
Label on accent18.55:1AAA pass 4.5:1
Primary on background4.20:1AA Large pass 3:1
Accent on background17.23:1AAA pass 3:1
Dark mode
PairSampleRatioWCAG
Text on background12.30:1AAA pass 4.5:1
Text on surface11.62:1AAA pass 4.5:1
Muted text on background4.90:1AA pass 4.5:1
Label on primary4.52:1AA pass 4.5:1
Label on accent6.32:1AA pass 4.5:1
Primary on background4.46:1AA Large pass 3:1
Accent on background3.19:1AA Large pass 3:1

Every color on every color

Rows are backgrounds and columns are text colors, using the actual palette colors. Ratios: AAA 7:1, AA 4.5:1, AA large text 3:1.

Every color on every color
Background / Text#04070F (Text 1)#0D1321 (Text 2)#1B273A (Text 3)#9F7932 (Text 4)#D4C9B5 (Text 5)
#04070FSame color1.09—1.34—5.04AA12.30AAA
#0D13211.09—Same color1.23—4.64AA11.32AAA
#1B273A1.34—1.23—Same color3.76AA Large9.17AAA
#9F79325.04AA4.64AA3.76AA LargeSame color2.44—
#D4C9B512.30AAA11.32AAA9.17AAA2.44—Same color

How to read contrast ratios (WCAG guide)

Shades

Shades and tints (50–950)

#04070F#0D1321#1B273A#9F7932#D4C9B5

Variations

About Midnight Library

Navy shelves and a brass reading lamp. Five colors make up Midnight Library, a balanced multi-color set: #04070F, #0D1321, #1B273A, #9F7932, #D4C9B5. Deep blue #1B273A and brown #9F7932 sit on nearly opposite sides of the wheel (179° apart), a complementary pairing that makes accents pop. A 71-point lightness range (13% for #04070F to 84% for #D4C9B5) gives strong value contrast, useful for text on background. Average chroma is 0.044, low for a palette, so the colors feel soft and muted; the most saturated color is #9F7932. As a UI theme it uses #967028 for primary actions and #0D1321 as the accent; dark mode sits on #04070F with #D4C9B5 text (12.3:1). With #9F7932 leading, good fits include brand systems with many sub-brands, marketing pages and data visualization.

Midnight Library color palette: #04070F, #0D1321, #1B273A, #9F7932, #D4C9B5
Share image for Midnight Library

Gradients in similar colors