Codex Themes Guide: Design Tokens, Palettes & Layout Prompts

Replace default AI gradients with intentional design systems: specify CSS custom properties, typography pairs, dark/light surfaces, and layout guardrails in Codex Sites prompts.

Why explicit theme tokens beat vague styling prompts

Asking Codex for a “modern clean theme” almost always produces generic purple-blue cards and inconsistent contrast. Specifying a compact CSS token block — exact background, elevated surface, primary text, muted text, border, accent color, font family, and radius — forces every generated header, table, modal, and button onto one cohesive visual system.

Even better, storing all colors as semantic CSS variables lets you add a dark/light mode toggle cleanly in one [data-theme="dark"] block without rewriting component styles.

5 Proven Codex Theme Presets

Drop any row’s palette and font specification directly into the Codex Sites Prompt Generator.

Theme StyleBest Use CaseSurface & Text TokensAccent & Font Pairing
Editorial PaperDocs, playbooks, knowledge hubs#FAF8F5 bg · #FFFFFF card · #18181B textDeep teal #0F766E · Fraunces + Inter
Slate SaaS DarkKPI dashboards, bug triage, internal tools#0B1120 bg · #111827 card · #F1F5F9 textElectric cyan #38BDF8 · Plus Jakarta Sans + JetBrains Mono
Technical Docs MonoDeveloper portals, API guides, changelogs#FFFFFF bg · #F8FAFC code · #0F172A textCobalt #2563EB · IBM Plex Sans + IBM Plex Mono
Warm StudioClient portals, agency hubs, portfolios#F5F2EB bg · #FFFDF9 card · #1C1917 textTerracotta #C2410C · DM Sans + Merriweather
High-Contrast OpsIncident trackers, compliance checklists#FFFFFF bg · #F4F4F5 surface · #09090B textEmerald #059669 · Inter + tabular numerals

Layout & Dark/Light Mode Prompt Guardrails

Include these four rules in every Codex theme prompt so pages stay legible on both 1440px desktops and 390px phones:

1. Define Exact Color Contrast

Explicitly require WCAG AA contrast (4.5:1 for body text, 3:1 for large headings and UI borders) across both light and dark modes.

2. Lock Max Width & Table Overflow

Specify max-width: 1120px for shells, 68ch for long-form prose, and horizontal scroll wrappers around every data table to prevent mobile overflow.

3. Limit Accent Sprawl

Use one primary accent for CTA buttons and active states, keeping backgrounds neutral so tables, statuses, and metrics remain scannable.

4. Separate Dark Theme Overrides

Instruct Codex to switch themes via html[data-theme="dark"] CSS variables plus a single accessible toggle button saved in localStorage.

FAQ & Next Steps

Does Codex Sites have a built-in theme marketplace?

No — Codex builds HTML/CSS directly from your prompt and workspace context. Supplying a token table and layout rules is the fastest way to reuse one consistent theme across pages.

How do I keep multi-page Codex sites visually consistent?

Keep a shared style.css token file and shared header/footer partial in your repo, then instruct Codex to reuse existing utility classes instead of inventing inline styles.

Prompt Generator Tool

Generate structured Codex Sites prompts with layout, access, and styling specs.

Deploy Your Styled Site

Publish from preview to Cloudflare Pages, Vercel, or GitHub Pages.