# Midnight theme

> Dark-native and dense. Near-black surfaces, half-pixel lines, indigo focus and a variable sans with its own weight steps.

Page: https://uicontext.com/themes/midnight

Templates that start in it: [Task manager](https://uicontext.com/blocks/issue-tracker.md).

It starts dark. Its sans-serif font is Inter Variable.

## Use Midnight

Apply the StyleX themes to your app’s root, or copy the roles as CSS variables or JSON for anything else.

### StyleX

```ts
import { midnight, midnightScheme } from "./ui/uicontext/components/themes.stylex.ts"

// every group midnight sets, and the scheme it starts in
h.div.attrs(sx(...midnight, midnightScheme)).children(app)
```

### CSS variables

```css
/* Midnight: a UiContext design language. */
:root {
	color-scheme: dark;
	/* color */
	--color-app: light-dark(#fbfbfc, #0b0c0f);
	--color-panel: light-dark(#ffffff, #111216);
	--color-sidebar: light-dark(#f4f4f6, #08090b);
	--color-raised: light-dark(#f6f6f8, #15161b);
	--color-overlay: light-dark(#ffffff, #1a1b21);
	--color-hover: light-dark(#f0f0f3, #1b1c22);
	--color-selected: light-dark(#ededf1, #23242c);
	--color-line: light-dark(#e7e7ec, #202128);
	--color-line-strong: light-dark(#dcdce3, #2b2c35);
	--color-control-line: light-dark(#85868f, #7b7d88);
	--color-fg: light-dark(#16171c, #eceef3);
	--color-muted: light-dark(#5b5d68, #9c9faa);
	--color-faint: light-dark(#62646f, #9396a1);
	--color-accent: light-dark(#4b55c8, #8f97ff);
	--color-accent-fg: light-dark(#ffffff, #0b0c0f);
	--color-focus-ring: light-dark(#4b55c8, #8f97ff);
	--color-danger: light-dark(#c4302b, #f87171);
	--color-warning: light-dark(#a34a0b, #fb923c);
	--color-caution: light-dark(#875c05, #facc15);
	--color-info: light-dark(#1d4ed8, #60a5fa);
	--color-success: light-dark(#13723a, #4ade80);
	--color-done: light-dark(#4f46e5, #a5b4fc);
	--color-neutral: light-dark(#66666f, #a1a1aa);
	--color-agent: light-dark(#6d3fd6, #c4b5fd);
	--color-brand: light-dark(#4b55c8, #8f97ff);
	--color-brand-fg: light-dark(#ffffff, #0b0c0f);
	/* signal */
	--signal-accent: light-dark(#4b55c8, #8f97ff);
	--signal-on-accent: light-dark(#ffffff, #0b0c0f);
	--signal-success: light-dark(#13723a, #4ade80);
	--signal-warning: light-dark(#a34a0b, #fb923c);
	--signal-danger: light-dark(#c4302b, #f87171);
	--signal-info: light-dark(#1d4ed8, #60a5fa);
	/* font */
	--font-sans: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--font-mono: "JetBrains Mono Variable", "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, SFMono-Regular, Menlo, monospace;
	--font-serif: "Newsreader", "Newsreader Fallback", ui-serif, Georgia, Cambria, serif;
	/* type */
	--type-display-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-display-size: 32px;
	--type-display-weight: 680;
	--type-display-line-height: 38px;
	--type-display-tracking: -1.1px;
	--type-page-title-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-page-title-size: 22px;
	--type-page-title-weight: 590;
	--type-page-title-line-height: 28px;
	--type-page-title-tracking: -0.6px;
	--type-section-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-section-size: 17px;
	--type-section-weight: 590;
	--type-section-line-height: 24px;
	--type-section-tracking: -0.3px;
	--type-card-title-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-card-title-size: 15px;
	--type-card-title-weight: 590;
	--type-card-title-line-height: 20px;
	--type-card-title-tracking: -0.15px;
	--type-body-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-body-size: 13px;
	--type-body-weight: 450;
	--type-body-line-height: 20px;
	--type-body-tracking: -0.1px;
	--type-control-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-control-size: 13px;
	--type-control-weight: 510;
	--type-control-line-height: 18px;
	--type-control-tracking: -0.1px;
	--type-meta-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-meta-size: 12px;
	--type-meta-weight: 510;
	--type-meta-line-height: 16px;
	--type-meta-tracking: 0px;
	--type-figure-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-figure-size: 28px;
	--type-figure-weight: 590;
	--type-figure-line-height: 34px;
	--type-figure-tracking: -0.8px;
	--type-code-family: "JetBrains Mono Variable", "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, SFMono-Regular, Menlo, monospace;
	--type-code-size: 12px;
	--type-code-weight: 450;
	--type-code-line-height: 18px;
	--type-code-tracking: 0px;
	/* weight */
	--weight-regular: 450;
	--weight-medium: 510;
	--weight-semibold: 590;
	--weight-bold: 680;
	/* stroke */
	--stroke-hairline: 0.5px;
	--stroke-control: 1px;
	/* corner */
	--corner-tag: 4px;
	--corner-control: 6px;
	--corner-card: 8px;
	--corner-popover: 10px;
	--corner-modal: 12px;
	--corner-pill: 9999px;
	/* elevation */
	--elevation-control: 0 1px 2px light-dark(rgb(17 18 24 / 0.06), rgb(0 0 0 / 0.4));
	--elevation-card: 0 0 0 1px light-dark(rgb(17 18 24 / 0.06), rgb(255 255 255 / 0.06)), 0 1px 2px light-dark(rgb(17 18 24 / 0.04), rgb(0 0 0 / 0.4));
	--elevation-raised: 0 0 0 1px light-dark(rgb(17 18 24 / 0.06), rgb(255 255 255 / 0.07)), 0 2px 8px light-dark(rgb(17 18 24 / 0.08), rgb(0 0 0 / 0.45));
	--elevation-menu: 0 0 0 1px light-dark(rgb(17 18 24 / 0.08), rgb(255 255 255 / 0.08)), 0 4px 16px light-dark(rgb(17 18 24 / 0.1), rgb(0 0 0 / 0.5));
	--elevation-modal: 0 0 0 1px light-dark(rgb(17 18 24 / 0.08), rgb(255 255 255 / 0.1)), 0 16px 48px light-dark(rgb(17 18 24 / 0.16), rgb(0 0 0 / 0.6));
	--elevation-blur: 16px;
	--elevation-opacity: 0.86;
	/* density */
	--density-row: 36px;
	--density-control: 30px;
	--density-sidebar: 244px;
	--density-header: 48px;
	--density-content: 1080px;
	--density-prose: 680px;
	/* icon */
	--icon-size: 16px;
	--icon-stroke: 1.5px;
	/* motion */
	--motion-fast: 100ms;
	--motion-base: 150ms;
	--motion-slow: 250ms;
	--motion-enter: 200ms;
	--motion-exit: 150ms;
	--motion-menu: 150ms;
	--motion-modal: 250ms;
	--motion-drawer: 320ms;
	--motion-move: 200ms;
	--motion-ease: cubic-bezier(0.2, 0, 0, 1);
	--motion-ease-out: cubic-bezier(0.19, 1, 0.22, 1);
	--motion-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
	--motion-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
	--motion-press: 0.97;
	--motion-pop: 0.96;
	--motion-shift: 4px;
}
@media (pointer: coarse) {
	:root {
		--density-row: max(36px, 44px);
		--density-control: max(30px, 44px);
	}
}
```

### Tokens (JSON)

```json
{
	"name": "midnight",
	"label": "Midnight",
	"scheme": "dark",
	"color": {
		"app": {
			"light": "#fbfbfc",
			"dark": "#0b0c0f"
		},
		"panel": {
			"light": "#ffffff",
			"dark": "#111216"
		},
		"sidebar": {
			"light": "#f4f4f6",
			"dark": "#08090b"
		},
		"raised": {
			"light": "#f6f6f8",
			"dark": "#15161b"
		},
		"overlay": {
			"light": "#ffffff",
			"dark": "#1a1b21"
		},
		"hover": {
			"light": "#f0f0f3",
			"dark": "#1b1c22"
		},
		"selected": {
			"light": "#ededf1",
			"dark": "#23242c"
		},
		"line": {
			"light": "#e7e7ec",
			"dark": "#202128"
		},
		"lineStrong": {
			"light": "#dcdce3",
			"dark": "#2b2c35"
		},
		"controlLine": {
			"light": "#85868f",
			"dark": "#7b7d88"
		},
		"fg": {
			"light": "#16171c",
			"dark": "#eceef3"
		},
		"muted": {
			"light": "#5b5d68",
			"dark": "#9c9faa"
		},
		"faint": {
			"light": "#62646f",
			"dark": "#9396a1"
		},
		"accent": {
			"light": "#4b55c8",
			"dark": "#8f97ff"
		},
		"accentFg": {
			"light": "#ffffff",
			"dark": "#0b0c0f"
		},
		"focusRing": {
			"light": "#4b55c8",
			"dark": "#8f97ff"
		},
		"danger": {
			"light": "#c4302b",
			"dark": "#f87171"
		},
		"warning": {
			"light": "#a34a0b",
			"dark": "#fb923c"
		},
		"caution": {
			"light": "#875c05",
			"dark": "#facc15"
		},
		"info": {
			"light": "#1d4ed8",
			"dark": "#60a5fa"
		},
		"success": {
			"light": "#13723a",
			"dark": "#4ade80"
		},
		"done": {
			"light": "#4f46e5",
			"dark": "#a5b4fc"
		},
		"neutral": {
			"light": "#66666f",
			"dark": "#a1a1aa"
		},
		"agent": {
			"light": "#6d3fd6",
			"dark": "#c4b5fd"
		},
		"brand": {
			"light": "#4b55c8",
			"dark": "#8f97ff"
		},
		"brandFg": {
			"light": "#ffffff",
			"dark": "#0b0c0f"
		}
	},
	"signal": {
		"accent": {
			"light": "#4b55c8",
			"dark": "#8f97ff"
		},
		"onAccent": {
			"light": "#ffffff",
			"dark": "#0b0c0f"
		},
		"success": {
			"light": "#13723a",
			"dark": "#4ade80"
		},
		"warning": {
			"light": "#a34a0b",
			"dark": "#fb923c"
		},
		"danger": {
			"light": "#c4302b",
			"dark": "#f87171"
		},
		"info": {
			"light": "#1d4ed8",
			"dark": "#60a5fa"
		}
	},
	"family": {
		"sans": "\"Inter Variable\", \"Inter\", \"Inter Fallback\", ui-sans-serif, system-ui, -apple-system, sans-serif",
		"mono": "\"JetBrains Mono Variable\", \"JetBrains Mono\", \"JetBrains Mono Fallback\", ui-monospace, SFMono-Regular, Menlo, monospace",
		"serif": "\"Newsreader\", \"Newsreader Fallback\", ui-serif, Georgia, Cambria, serif"
	},
	"typography": {
		"display": {
			"family": "sans",
			"size": "32px",
			"weight": "680",
			"lineHeight": "38px",
			"tracking": "-1.1px"
		},
		"pageTitle": {
			"family": "sans",
			"size": "22px",
			"weight": "590",
			"lineHeight": "28px",
			"tracking": "-0.6px"
		},
		"section": {
			"family": "sans",
			"size": "17px",
			"weight": "590",
			"lineHeight": "24px",
			"tracking": "-0.3px"
		},
		"cardTitle": {
			"family": "sans",
			"size": "15px",
			"weight": "590",
			"lineHeight": "20px",
			"tracking": "-0.15px"
		},
		"body": {
			"family": "sans",
			"size": "13px",
			"weight": "450",
			"lineHeight": "20px",
			"tracking": "-0.1px"
		},
		"control": {
			"family": "sans",
			"size": "13px",
			"weight": "510",
			"lineHeight": "18px",
			"tracking": "-0.1px"
		},
		"meta": {
			"family": "sans",
			"size": "12px",
			"weight": "510",
			"lineHeight": "16px",
			"tracking": "0px"
		},
		"figure": {
			"family": "sans",
			"size": "28px",
			"weight": "590",
			"lineHeight": "34px",
			"tracking": "-0.8px"
		},
		"code": {
			"family": "mono",
			"size": "12px",
			"weight": "450",
			"lineHeight": "18px",
			"tracking": "0px"
		}
	},
	"weight": {
		"regular": "450",
		"medium": "510",
		"semibold": "590",
		"bold": "680"
	},
	"stroke": {
		"hairline": "0.5px",
		"control": "1px"
	},
	"corner": {
		"tag": "4px",
		"control": "6px",
		"card": "8px",
		"popover": "10px",
		"modal": "12px",
		"pill": "9999px"
	},
	"elevation": {
		"control": {
			"light": "0 1px 2px rgb(17 18 24 / 0.06)",
			"dark": "0 1px 2px rgb(0 0 0 / 0.4)"
		},
		"card": {
			"light": "0 0 0 1px rgb(17 18 24 / 0.06), 0 1px 2px rgb(17 18 24 / 0.04)",
			"dark": "0 0 0 1px rgb(255 255 255 / 0.06), 0 1px 2px rgb(0 0 0 / 0.4)"
		},
		"raised": {
			"light": "0 0 0 1px rgb(17 18 24 / 0.06), 0 2px 8px rgb(17 18 24 / 0.08)",
			"dark": "0 0 0 1px rgb(255 255 255 / 0.07), 0 2px 8px rgb(0 0 0 / 0.45)"
		},
		"menu": {
			"light": "0 0 0 1px rgb(17 18 24 / 0.08), 0 4px 16px rgb(17 18 24 / 0.1)",
			"dark": "0 0 0 1px rgb(255 255 255 / 0.08), 0 4px 16px rgb(0 0 0 / 0.5)"
		},
		"modal": {
			"light": "0 0 0 1px rgb(17 18 24 / 0.08), 0 16px 48px rgb(17 18 24 / 0.16)",
			"dark": "0 0 0 1px rgb(255 255 255 / 0.1), 0 16px 48px rgb(0 0 0 / 0.6)"
		},
		"blur": "16px",
		"opacity": "0.86"
	},
	"density": {
		"row": "36px",
		"control": "30px",
		"sidebar": "244px",
		"header": "48px",
		"content": "1080px",
		"prose": "680px"
	},
	"icon": {
		"size": "16px",
		"stroke": "1.5px"
	},
	"motion": {
		"fast": "100ms",
		"base": "150ms",
		"slow": "250ms",
		"enter": "200ms",
		"exit": "150ms",
		"menu": "150ms",
		"modal": "250ms",
		"drawer": "320ms",
		"move": "200ms",
		"ease": "cubic-bezier(0.2, 0, 0, 1)",
		"easeOut": "cubic-bezier(0.19, 1, 0.22, 1)",
		"easeInOut": "cubic-bezier(0.77, 0, 0.175, 1)",
		"easeDrawer": "cubic-bezier(0.32, 0.72, 0, 1)",
		"press": "0.97",
		"pop": "0.96",
		"shift": "4px"
	}
}
```

## Other themes

- [Ink](https://uicontext.com/themes/ink.md): Pure black and white. One-pixel rings instead of shadows, a single blue for focus and action, wide pages and a tall header.
- [Slate](https://uicontext.com/themes/slate.md): White cards on a cool gray canvas (a neutral one in the dark), a vivid violet, slate-tinted shadows and big tabular figures.
- [Paper](https://uicontext.com/themes/paper.md): Warm off-white paper, umber-tinted rings, a calm blue and a narrow page made for writing. Headings can switch to a serif.
- [Parchment](https://uicontext.com/themes/parchment.md): Warm parchment and terracotta. A literary serif for headings and replies, a sans for controls, generous corners and a soft paper lift.
- [Carbon](https://uicontext.com/themes/carbon.md): Carbon studio surfaces and an emerald brand. Mono for tables, IDs and queries, one-pixel borders and almost no lift.
- [Glass](https://uicontext.com/themes/glass.md): A translucent window over the desktop: a heavy backdrop blur, a one-pixel rim, a coral accent and quick motion. Made for command surfaces.
- [Sunburst](https://uicontext.com/themes/sunburst.md): Neo-brutal and playful. Cream and butter yellows, black ink, two-pixel strokes, hard ink offsets and a grotesk with its mono.

Make your own in the [theme editor](https://uicontext.com/themes/editor.md).
