updated 2026-11-26·2 min read
Build Your First Theme
Create and import Noether themes using ThemeDefinition JSON, modeSupport ('both', 'dark-only', 'light-only'), customCss overrides, and Settings > Appearance.
Themes in Noether are JSON ThemeDefinition objects (src/core/themes/types.ts) with color tokens and an optional customCss string. You create or import them directly in Settings > Appearance, and themeRegistry saves them to localStorage (noether_custom_themes_v1) and applies them immediately.
1. The ThemeDefinition JSON Format
A custom theme defines name, modeSupport, variables (baseline/dark colors), optional modes.light / modes.dark overrides, and optional customCss:
{
"id": "solar-ember",
"name": "Solar Ember",
"description": "Warm charcoal dark surfaces and light mode overrides with coral accents.",
"author": "Yuliet Li",
"modeSupport": "both",
"variables": {
"bgTopBar": "#181412",
"bgSidebar": "#1f1a17",
"bgMain": "#241e1a",
"bgCard": "#2c2520",
"bgPopover": "#2c2520",
"bgInput": "#1a1613",
"accent": "#d94338"
},
"modes": {
"light": {
"bgTopBar": "#f7ede0",
"bgSidebar": "#fbf4eb",
"bgMain": "#ffffff",
"bgCard": "#f2e4d4",
"bgPopover": "#ffffff",
"bgInput": "#f0e0ce",
"accent": "#eb584d"
}
},
"customCss": ".ProseMirror h1 { letter-spacing: -0.02em; }"
}
Supported Theme Modes (modeSupport)
"both": Supports Dark and Light modes.variablesserves as the baseline (dark), andmodes.lightoverrides tokens when Light mode is active."dark-only": Locks the theme to dark mode regardless of the global lighting toggle."light-only": Locks the theme to light mode regardless of the global lighting toggle.
2. How Tokens Resolve at Runtime
When you import or select a theme, themeRegistry.importTheme() fills any omitted tokens (such as borderSubtle, textPrimary, or bgApp) from NOETHER_THEME (src/core/themes/preinstalled/noether.ts). Only name and variables (bgTopBar, bgSidebar, bgMain, accent) are required:
- Switching between Dark, Light, and System under Settings > Appearance calls
themeRegistry.resolveThemeTokens()and updates CSS custom properties on:rootimmediately. - If
customCssis set, Noether injects it into<style id="noether-theme-custom-css">in<head>. - For full CSS variable names generated from
ThemeColorTokens, see CSS Variables & Design Tokens.
3. Creating & Testing a Theme in Settings
- Open Noether Settings
Open Settings (Ctrl+, / Cmd+,) and navigate to Appearance > Themes.
- Create or Import JSON
Click Create Theme to pick top bar, sidebar, canvas, and accent colors visually, or click Import JSON and paste your ThemeDefinition payload.
- Verify Both Modes
Toggle Lighting mode between Dark, Light, and System to check text contrast and surfaces.
4. Next Steps
- Check all generated
--noether-*CSS properties in CSS Variables & Design Tokens. - See how native UI controls consume those tokens in Noether UI Components.
- Read Submitting Themes for exporting and sharing your JSON theme definition.