Create Theme
Configuration Location
Themes are configured in ~/.config/sidecar/config.json:
{
"ui": {
"showFooter": true,
"showClock": true,
"nerdFontsEnabled": false,
"theme": {
"name": "default",
"overrides": {
"primary": "#FF5500",
"success": "#00FF00"
}
}
}
}
Available Base Themes
Sidecar ships with 21 modern, contrast-compliant themes designed around a 7-step neutral ramp and single signature chrome accent:
- sidecar-modern - Modern default with signature gold accent (
#c0982f) and dark neutral ramp
- catppuccin-mocha - Soothing lavender/blue (
#89b4fa) with dark mantle
- tokyonight-storm - Tokyo neon night blue (
#7aa2f7)
- gruvbox-dark - Retro warm gold (
#fabd2f) & aqua (#8ec07c)
- dracula - Refined vampire violet (
#bd93f9)
- nord - Arctic frost cyan (
#88c0d0)
- atom-one-dark - Balanced editor cyan/blue (
#61afef)
- kanagawa-wave - Woodblock print wave blue (
#7e9cd8)
- rose-pine - Soho rose (
#eb6f92) & pine cyan (#9ccfd8)
- everforest-dark - Earthy forest green (
#a7c080) & warm amber (#dbbc7f)
- solarized-dark - Precision amber/yellow (
#b58900) & cyan (#2aa198)
- monokai-pro - Crisp gold (
#ffd866) & green (#a6e22e)
- night-owl - Deep navy blue (
#82aaff)
- ayu-mirage - Warm sunset gold (
#6dcbfa) on slate
- github-dark - Crisp GitHub cobalt (
#58a6ff)
- synthwave - 80s retrowave fuchsia (
#ff77ff)
- cobalt2 - High-contrast Wes Bos cobalt yellow (
#ffe50a)
- horizon - Cyberpunk apricot/red (
#ed718e)
- shades-of-purple - High-contrast magenta/violet (
#ff77ff)
- spacegray-eighties - Muted classic warm gray & blue (
#7ba1cf)
- zenburn - Low-contrast soft green (
#90cbae)
Creating a Custom Theme
Method 1: Override Specific Colors
Start from a base theme and override specific colors:
{
"ui": {
"theme": {
"name": "default",
"overrides": {
"primary": "#E91E63",
"success": "#4CAF50",
"error": "#F44336",
"syntaxTheme": "github"
}
}
}
}
Method 2: Full Theme Override
Override all colors for complete control. See references/palette-reference.md for every available color key and their default values across themes.
Method 3: Custom Gradient Borders
Panel borders support angled gradients (default 30 degrees) flowing diagonally:
{
"ui": {
"theme": {
"overrides": {
"gradientBorderActive": ["#FF0000", "#FF7F00", "#FFFF00", "#00FF00", "#0000FF", "#8B00FF"],
"gradientBorderAngle": 45
}
}
}
}
Gradients support 2+ color stops. If not specified, solid borderActive/borderNormal colors are fallback.
Tab Styles
Configure with tabStyle and tabColors in overrides:
Tab Styles:
gradient - Colors flow continuously across all tabs (per-character interpolation)
per-tab - Each tab gets a distinct solid color from array (cycles)
solid - Uses theme primary/tertiary colors
minimal - No background, active tab uses underline
Built-in Presets (use as tabStyle value):
rainbow - Red -> Green -> Blue -> Purple (gradient)
sunset - Orange -> Peach -> Pink (gradient)
ocean - Deep Blue -> Cyan -> Light Blue (gradient)
aurora - Purple -> Dark Purple -> Teal (gradient)
neon - Magenta -> Cyan -> Green (gradient)
fire - Red-Orange -> Orange -> Gold (gradient)
forest - Dark Green -> Mid Green -> Light Green (gradient)
candy - Pink -> Purple -> Turquoise (gradient)
pastel - Pink, Green, Blue, Yellow (per-tab)
jewel - Ruby, Sapphire, Amethyst, Topaz (per-tab)
terminal - Red, Green, Cyan, Yellow (per-tab)
mono - Theme primary color (solid)
accent - Theme accent color (solid)
underline - No background, underlined active (minimal)
dim - No background, dim inactive (minimal)
Examples:
// Use a preset
{ "overrides": { "tabStyle": "sunset" } }
// Custom gradient
{ "overrides": { "tabStyle": "gradient", "tabColors": ["#FF6B35", "#F7C59F", "#FF006E"] } }
// Per-tab distinct colors
{ "overrides": { "tabStyle": "per-tab", "tabColors": ["#FF5555", "#50FA7B", "#8BE9FD", "#F1FA8C"] } }
Color Key Categories
All colors use hex format (#RRGGBB). Key categories:
- Brand:
primary, secondary, accent
- Status:
success, warning, error, info
- Text:
textPrimary, textSecondary, textMuted, textSubtle, textHighlight, textSelection, textInverse
- Background:
bgPrimary, bgSecondary, bgTertiary, bgOverlay, selectionBg
- Border:
borderNormal, borderActive, borderMuted
- Gradient border:
gradientBorderActive, gradientBorderNormal (arrays), gradientBorderAngle (number)
- Tab:
tabStyle, tabColors (array)
- Diff:
diffAddFg, diffAddBg, diffRemoveFg, diffRemoveBg
- UI elements:
buttonHover, tabTextInactive, link, toastSuccessText, toastErrorText
- Danger:
dangerLight, dangerDark, dangerBright, dangerHover
- Blame age:
blameAge1 through blameAge5
- Third-party:
syntaxTheme (Chroma theme name), markdownTheme (dark/light)
Full color values for all themes: see references/palette-reference.md.
Syntax Themes
The syntaxTheme value can be any Chroma theme:
monokai, dracula, github, github-dark, nord, onedark, solarized-dark, solarized-light, vs, vim
See Chroma Style Gallery for all options.
It applies everywhere Sidecar highlights code: raw file previews, git diffs, and
fenced code blocks inside rendered Markdown. If the name is not a registered
Chroma style, Sidecar falls back deterministically to github for light
palettes and monokai for dark ones rather than failing.
Markdown Colors
There is no Markdown-specific color family. Rendered Markdown — Files
preview, Notes view mode, conversation bodies, workspace document/issue/resource
panes, release notes — is styled by internal/markdown from the same normalized
semantic palette every other surface uses, so a new theme gets palette-correct
Markdown for free and a live theme preview (#) repaints already-open documents
immediately.
| Markdown role |
Palette key |
| Body, paragraph, table text |
textPrimary |
| H3–H4, image/definition terms |
textSecondary |
| H5–H6, strikethrough, quote text, metadata |
textMuted |
| H1, strong text, list/enumeration/task markers |
primary |
| Other headings, inline code text |
accent |
| Block quotes |
secondary |
| Links and link text |
link |
| Horizontal rules |
borderMuted (falling back to borderNormal) |
| Inline code background |
bgSecondary |
| Fenced code blocks |
syntaxTheme |
The rendered document deliberately paints no background so pane chrome and
selection keep owning the canvas; only inline code and the Chroma code-block
style carry one.
markdownTheme
markdownTheme is not a color. It has two behaviors:
dark or light — the normal case. Sidecar takes only structure from that
Glamour preset (margins, prefixes, list glyphs, task markers) and then
overwrites every color from the table above. Set it to match your
background; if it is missing or unusable, Sidecar picks a mode from
bgPrimary's luma.
- Any other value — an advanced full-style override: a registered Glamour
style name, or a path to a Glamour JSON style file. That file owns the whole
Markdown appearance and the palette mapping is skipped entirely. Use this only
when you deliberately want Markdown to stop tracking the Sidecar palette.
Curated themes and community conversions must use dark or light; an
all-theme audit test (internal/markdown/theme_audit_test.go) fails on a
missing semantic color, an unknown syntaxTheme, or a non-structural
markdownTheme.
Color Validation
Colors must be valid hex in #RRGGBB format. Invalid colors are ignored.
- Valid:
"#FF5500", "#ff5500" (lowercase ok)
- Invalid:
"FF5500" (missing #), "#F50" (shorthand), "red" (named colors)
Nerd Fonts
When nerdFontsEnabled is true: pill-shaped tabs (Powerline chars), pill-shaped buttons. Requires a Nerd Font installed in your terminal.
Community Themes
Press # to open theme switcher, then Tab to browse 601 community color schemes. Supports search, live preview, color swatches. Press Enter to save.
Community themes are converted from iTerm2 color schemes. Stored by scheme name:
{
"ui": {
"theme": {
"name": "default",
"community": "Catppuccin Mocha",
"overrides": { "primary": "#ff79c6" }
}
}
}
To regenerate community themes from upstream:
git clone https://github.com/mbadolato/iTerm2-Color-Schemes ~/code/iTerm2-Color-Schemes
./scripts/generate-schemes.sh [path-to-repo]
Per-Project Themes
Each project can have its own theme. When switching with @, theme changes automatically.
{
"projects": {
"list": [
{ "name": "api", "path": "~/code/api", "theme": { "name": "dracula" } },
{ "name": "web", "path": "~/code/web", "theme": { "name": "default", "community": "Catppuccin Mocha" } },
{ "name": "tools", "path": "~/code/tools" }
]
}
}
Set per-project: press #, then ctrl+s to toggle scope to "Set for this project".
Resolution order: project theme > global ui.theme > "sidecar-modern".
Programmatic Theme Registration
import "github.com/marcus/sidecar/internal/styles"
myTheme := styles.Theme{
Name: "my-theme",
DisplayName: "My Custom Theme",
Colors: styles.ColorPalette{
Primary: "#FF5500",
Secondary: "#00FF55",
// ... all other colors
},
}
styles.RegisterTheme(myTheme)
styles.ApplyTheme("my-theme")
API Reference
styles.ListThemes() // []string of available theme names
styles.GetTheme("dracula") // Theme struct
styles.IsValidTheme("my-theme") // bool
styles.IsValidHexColor("#FF5500") // bool
styles.GetCurrentTheme() // Theme
styles.GetCurrentThemeName() // string
styles.ApplyTheme("dracula")
styles.ApplyThemeWithOverrides("default", map[string]string{"primary": "#FF5500"})
// Resolve effective theme for a project path (project > global > default)
import "github.com/marcus/sidecar/internal/theme"
resolved := theme.ResolveTheme(cfg, "/path/to/project")
theme.ApplyResolved(resolved)
Modern Theme Architecture (Sidecar Modern Standard)
Modern Sidecar themes (sidecar-modern, catppuccin-mocha) follow a refined, disciplined design system:
- Single Chrome Accent: Exactly one primary accent hue (e.g. Gold
#c0982f in sidecar-modern, Blue #89b4fa in catppuccin-mocha). Used for cursor ❯, active tab highlight, footer key glyphs (keyHintFg), and active border. Chrome does not use multi-color rainbow gradients.
- Structural Neutral Ramp: Geometry and hierarchy are carried by neutral lightness steps, not saturation:
BgPrimary: Canvas background
BgSecondary: Header / footer bar fills
BgTertiary: Selected row background
SelectionBg: Text-selection highlight; must lift off the canvas (TargetSelectionSeparation, currently 2.65:1) without leaving the canvas ink pole
SurfaceRaised: Raised pills (key hints, bar chips) sitting subtly above canvas/bars
BorderNormal / BorderMuted: Rules and hairlines
TextPrimary → TextSecondary → TextMuted → TextSubtle: Typography ramp
- Tab Style: Default to
"minimal" with single accent underline/highlight.
- Semantics-Driven Colors: Colors other than the single chrome accent are strictly earned by meaning (Done = Green, Open/ID = Teal, Destructive/Error = Red, Warning/P2 = Yellow/Gold, Links/Headings = Blue/Sapphire).
Contrast Rules (Strict AA Standard)
When authoring or converting themes, check contrast against all surfaces:
- Multi-Fill Validation (>= 4.5:1):
TextPrimary, TextSecondary, TextMuted, and TextSelection must clear 4.5:1 on ALL three background fills: BgPrimary, BgSecondary, and BgTertiary (selected row).
- All semantic accents (
Primary, Secondary, Success, Warning, Error, Info, Link, LaneWorking, LaneBlocked, LaneDone, LaneIdle, LanePaused, ProjectHues[*]) must clear >= 4.5:1 on BgPrimary, BgSecondary, and BgTertiary.
- Raised Chrome (
SurfaceRaised):
TextPrimary, TextSecondary, TextMuted, and KeyHintFg must clear >= 4.5:1 on SurfaceRaised.
TextSubtle and TabTextInactive must clear >= 3.0:1 on SurfaceRaised.
- Ink on Bright Fills:
- For bright or pastel status/danger backgrounds (e.g.
DangerBright, ToastSuccess, ToastError), use dark canvas ink (#0f1113 or #181825) for TextInverse / Toast*Text, as white (#ffffff) fails contrast on light reds/yellows.
DangerLight must clear >= 4.5:1 on DangerDark.
- Text-selection highlight (
SelectionBg):
- Must clear
TargetSelectionSeparation (currently 2.65:1) against BgPrimary so a selected span is findable against the shell canvas. BgTertiary (the selected-row fill) is not enough. Bump that constant to lift every theme at once.
- Must stay on the same ink pole as
BgPrimary, and TextPrimary must still clear >= 4.5:1 on it. Do not invert selected text or lighten the highlight until headings and syntax wash out.
NormalizePalette lifts empty, inverted, or too-dim values; author the role deliberately on curated themes.
1---2name: create-theme3description: Create custom color themes for Sidecar, including base theme selection, color overrides, gradient borders, tab styles, per-project themes, community themes, and programmatic theme registration. Use when creating or modifying themes, adjusting UI appearance, or debugging color/style issues. See references/palette-reference.md for the full color palette with all keys and per-theme values.4---56# Create Theme78## Configuration Location910Themes are configured in `~/.config/sidecar/config.json`:1112```json13{14 "ui": {15 "showFooter": true,16 "showClock": true,17 "nerdFontsEnabled": false,18 "theme": {19 "name": "default",20 "overrides": {21 "primary": "#FF5500",22 "success": "#00FF00"23 }24 }25 }26}27```2829## Available Base Themes3031Sidecar ships with 21 modern, contrast-compliant themes designed around a 7-step neutral ramp and single signature chrome accent:3233- **sidecar-modern** - Modern default with signature gold accent (`#c0982f`) and dark neutral ramp34- **catppuccin-mocha** - Soothing lavender/blue (`#89b4fa`) with dark mantle35- **tokyonight-storm** - Tokyo neon night blue (`#7aa2f7`)36- **gruvbox-dark** - Retro warm gold (`#fabd2f`) & aqua (`#8ec07c`)37- **dracula** - Refined vampire violet (`#bd93f9`)38- **nord** - Arctic frost cyan (`#88c0d0`)39- **atom-one-dark** - Balanced editor cyan/blue (`#61afef`)40- **kanagawa-wave** - Woodblock print wave blue (`#7e9cd8`)41- **rose-pine** - Soho rose (`#eb6f92`) & pine cyan (`#9ccfd8`)42- **everforest-dark** - Earthy forest green (`#a7c080`) & warm amber (`#dbbc7f`)43- **solarized-dark** - Precision amber/yellow (`#b58900`) & cyan (`#2aa198`)44- **monokai-pro** - Crisp gold (`#ffd866`) & green (`#a6e22e`)45- **night-owl** - Deep navy blue (`#82aaff`)46- **ayu-mirage** - Warm sunset gold (`#6dcbfa`) on slate47- **github-dark** - Crisp GitHub cobalt (`#58a6ff`)48- **synthwave** - 80s retrowave fuchsia (`#ff77ff`)49- **cobalt2** - High-contrast Wes Bos cobalt yellow (`#ffe50a`)50- **horizon** - Cyberpunk apricot/red (`#ed718e`)51- **shades-of-purple** - High-contrast magenta/violet (`#ff77ff`)52- **spacegray-eighties** - Muted classic warm gray & blue (`#7ba1cf`)53- **zenburn** - Low-contrast soft green (`#90cbae`)5455## Creating a Custom Theme5657### Method 1: Override Specific Colors5859Start from a base theme and override specific colors:60```json61{62 "ui": {63 "theme": {64 "name": "default",65 "overrides": {66 "primary": "#E91E63",67 "success": "#4CAF50",68 "error": "#F44336",69 "syntaxTheme": "github"70 }71 }72 }73}74```7576### Method 2: Full Theme Override7778Override all colors for complete control. See `references/palette-reference.md` for every available color key and their default values across themes.7980### Method 3: Custom Gradient Borders8182Panel borders support angled gradients (default 30 degrees) flowing diagonally:83```json84{85 "ui": {86 "theme": {87 "overrides": {88 "gradientBorderActive": ["#FF0000", "#FF7F00", "#FFFF00", "#00FF00", "#0000FF", "#8B00FF"],89 "gradientBorderAngle": 4590 }91 }92 }93}94```9596Gradients support 2+ color stops. If not specified, solid `borderActive`/`borderNormal` colors are fallback.9798## Tab Styles99100Configure with `tabStyle` and `tabColors` in overrides:101102**Tab Styles:**103- `gradient` - Colors flow continuously across all tabs (per-character interpolation)104- `per-tab` - Each tab gets a distinct solid color from array (cycles)105- `solid` - Uses theme primary/tertiary colors106- `minimal` - No background, active tab uses underline107108**Built-in Presets** (use as `tabStyle` value):109- `rainbow` - Red -> Green -> Blue -> Purple (gradient)110- `sunset` - Orange -> Peach -> Pink (gradient)111- `ocean` - Deep Blue -> Cyan -> Light Blue (gradient)112- `aurora` - Purple -> Dark Purple -> Teal (gradient)113- `neon` - Magenta -> Cyan -> Green (gradient)114- `fire` - Red-Orange -> Orange -> Gold (gradient)115- `forest` - Dark Green -> Mid Green -> Light Green (gradient)116- `candy` - Pink -> Purple -> Turquoise (gradient)117- `pastel` - Pink, Green, Blue, Yellow (per-tab)118- `jewel` - Ruby, Sapphire, Amethyst, Topaz (per-tab)119- `terminal` - Red, Green, Cyan, Yellow (per-tab)120- `mono` - Theme primary color (solid)121- `accent` - Theme accent color (solid)122- `underline` - No background, underlined active (minimal)123- `dim` - No background, dim inactive (minimal)124125Examples:126```json127// Use a preset128{ "overrides": { "tabStyle": "sunset" } }129130// Custom gradient131{ "overrides": { "tabStyle": "gradient", "tabColors": ["#FF6B35", "#F7C59F", "#FF006E"] } }132133// Per-tab distinct colors134{ "overrides": { "tabStyle": "per-tab", "tabColors": ["#FF5555", "#50FA7B", "#8BE9FD", "#F1FA8C"] } }135```136137## Color Key Categories138139All colors use hex format (`#RRGGBB`). Key categories:140141- **Brand**: `primary`, `secondary`, `accent`142- **Status**: `success`, `warning`, `error`, `info`143- **Text**: `textPrimary`, `textSecondary`, `textMuted`, `textSubtle`, `textHighlight`, `textSelection`, `textInverse`144- **Background**: `bgPrimary`, `bgSecondary`, `bgTertiary`, `bgOverlay`, `selectionBg`145- **Border**: `borderNormal`, `borderActive`, `borderMuted`146- **Gradient border**: `gradientBorderActive`, `gradientBorderNormal` (arrays), `gradientBorderAngle` (number)147- **Tab**: `tabStyle`, `tabColors` (array)148- **Diff**: `diffAddFg`, `diffAddBg`, `diffRemoveFg`, `diffRemoveBg`149- **UI elements**: `buttonHover`, `tabTextInactive`, `link`, `toastSuccessText`, `toastErrorText`150- **Danger**: `dangerLight`, `dangerDark`, `dangerBright`, `dangerHover`151- **Blame age**: `blameAge1` through `blameAge5`152- **Third-party**: `syntaxTheme` (Chroma theme name), `markdownTheme` (`dark`/`light`)153154Full color values for all themes: see `references/palette-reference.md`.155156## Syntax Themes157158The `syntaxTheme` value can be any Chroma theme:159- `monokai`, `dracula`, `github`, `github-dark`, `nord`, `onedark`, `solarized-dark`, `solarized-light`, `vs`, `vim`160161See [Chroma Style Gallery](https://xyproto.github.io/splash/docs/) for all options.162163It applies everywhere Sidecar highlights code: raw file previews, git diffs, and164fenced code blocks inside rendered Markdown. If the name is not a registered165Chroma style, Sidecar falls back deterministically to `github` for light166palettes and `monokai` for dark ones rather than failing.167168## Markdown Colors169170There is **no Markdown-specific color family**. Rendered Markdown — Files171preview, Notes view mode, conversation bodies, workspace document/issue/resource172panes, release notes — is styled by `internal/markdown` from the same normalized173semantic palette every other surface uses, so a new theme gets palette-correct174Markdown for free and a live theme preview (`#`) repaints already-open documents175immediately.176177| Markdown role | Palette key |178| --- | --- |179| Body, paragraph, table text | `textPrimary` |180| H3–H4, image/definition terms | `textSecondary` |181| H5–H6, strikethrough, quote text, metadata | `textMuted` |182| H1, strong text, list/enumeration/task markers | `primary` |183| Other headings, inline code text | `accent` |184| Block quotes | `secondary` |185| Links and link text | `link` |186| Horizontal rules | `borderMuted` (falling back to `borderNormal`) |187| Inline code background | `bgSecondary` |188| Fenced code blocks | `syntaxTheme` |189190The rendered document deliberately paints **no background** so pane chrome and191selection keep owning the canvas; only inline code and the Chroma code-block192style carry one.193194### markdownTheme195196`markdownTheme` is not a color. It has two behaviors:197198- `dark` or `light` — the normal case. Sidecar takes only *structure* from that199 Glamour preset (margins, prefixes, list glyphs, task markers) and then200 overwrites every color from the table above. Set it to match your201 background; if it is missing or unusable, Sidecar picks a mode from202 `bgPrimary`'s luma.203- Any other value — an advanced **full-style override**: a registered Glamour204 style name, or a path to a Glamour JSON style file. That file owns the whole205 Markdown appearance and the palette mapping is skipped entirely. Use this only206 when you deliberately want Markdown to stop tracking the Sidecar palette.207208Curated themes and community conversions must use `dark` or `light`; an209all-theme audit test (`internal/markdown/theme_audit_test.go`) fails on a210missing semantic color, an unknown `syntaxTheme`, or a non-structural211`markdownTheme`.212213## Color Validation214215Colors must be valid hex in `#RRGGBB` format. Invalid colors are ignored.216- Valid: `"#FF5500"`, `"#ff5500"` (lowercase ok)217- Invalid: `"FF5500"` (missing #), `"#F50"` (shorthand), `"red"` (named colors)218219## Nerd Fonts220221When `nerdFontsEnabled` is true: pill-shaped tabs (Powerline chars), pill-shaped buttons. Requires a Nerd Font installed in your terminal.222223## Community Themes224225Press `#` to open theme switcher, then `Tab` to browse 601 community color schemes. Supports search, live preview, color swatches. Press `Enter` to save.226227Community themes are converted from iTerm2 color schemes. Stored by scheme name:228```json229{230 "ui": {231 "theme": {232 "name": "default",233 "community": "Catppuccin Mocha",234 "overrides": { "primary": "#ff79c6" }235 }236 }237}238```239240To regenerate community themes from upstream:241```bash242git clone https://github.com/mbadolato/iTerm2-Color-Schemes ~/code/iTerm2-Color-Schemes243./scripts/generate-schemes.sh [path-to-repo]244```245246## Per-Project Themes247248Each project can have its own theme. When switching with `@`, theme changes automatically.249250```json251{252 "projects": {253 "list": [254 { "name": "api", "path": "~/code/api", "theme": { "name": "dracula" } },255 { "name": "web", "path": "~/code/web", "theme": { "name": "default", "community": "Catppuccin Mocha" } },256 { "name": "tools", "path": "~/code/tools" }257 ]258 }259}260```261262Set per-project: press `#`, then `ctrl+s` to toggle scope to "Set for this project".263264Resolution order: project theme > global `ui.theme` > `"sidecar-modern"`.265266## Programmatic Theme Registration267268```go269import "github.com/marcus/sidecar/internal/styles"270271myTheme := styles.Theme{272 Name: "my-theme",273 DisplayName: "My Custom Theme",274 Colors: styles.ColorPalette{275 Primary: "#FF5500",276 Secondary: "#00FF55",277 // ... all other colors278 },279}280281styles.RegisterTheme(myTheme)282styles.ApplyTheme("my-theme")283```284285## API Reference286287```go288styles.ListThemes() // []string of available theme names289styles.GetTheme("dracula") // Theme struct290styles.IsValidTheme("my-theme") // bool291styles.IsValidHexColor("#FF5500") // bool292styles.GetCurrentTheme() // Theme293styles.GetCurrentThemeName() // string294styles.ApplyTheme("dracula")295styles.ApplyThemeWithOverrides("default", map[string]string{"primary": "#FF5500"})296297// Resolve effective theme for a project path (project > global > default)298import "github.com/marcus/sidecar/internal/theme"299resolved := theme.ResolveTheme(cfg, "/path/to/project")300theme.ApplyResolved(resolved)301```302303## Modern Theme Architecture (`Sidecar Modern` Standard)304305Modern Sidecar themes (`sidecar-modern`, `catppuccin-mocha`) follow a refined, disciplined design system:3063071. **Single Chrome Accent**: Exactly *one* primary accent hue (e.g. Gold `#c0982f` in `sidecar-modern`, Blue `#89b4fa` in `catppuccin-mocha`). Used for cursor `❯`, active tab highlight, footer key glyphs (`keyHintFg`), and active border. Chrome does not use multi-color rainbow gradients.3082. **Structural Neutral Ramp**: Geometry and hierarchy are carried by neutral lightness steps, not saturation:309 - `BgPrimary`: Canvas background310 - `BgSecondary`: Header / footer bar fills311 - `BgTertiary`: Selected row background312 - `SelectionBg`: Text-selection highlight; must lift off the canvas (`TargetSelectionSeparation`, currently 2.65:1) without leaving the canvas ink pole313 - `SurfaceRaised`: Raised pills (key hints, bar chips) sitting subtly above canvas/bars314 - `BorderNormal` / `BorderMuted`: Rules and hairlines315 - `TextPrimary` → `TextSecondary` → `TextMuted` → `TextSubtle`: Typography ramp3163. **Tab Style**: Default to `"minimal"` with single accent underline/highlight.3174. **Semantics-Driven Colors**: Colors other than the single chrome accent are strictly earned by meaning (Done = Green, Open/ID = Teal, Destructive/Error = Red, Warning/P2 = Yellow/Gold, Links/Headings = Blue/Sapphire).318319### Contrast Rules (Strict AA Standard)320321When authoring or converting themes, check contrast against **all** surfaces:3223231. **Multi-Fill Validation (>= 4.5:1)**:324 - `TextPrimary`, `TextSecondary`, `TextMuted`, and `TextSelection` must clear 4.5:1 on ALL three background fills: `BgPrimary`, `BgSecondary`, and `BgTertiary` (selected row).325 - All semantic accents (`Primary`, `Secondary`, `Success`, `Warning`, `Error`, `Info`, `Link`, `LaneWorking`, `LaneBlocked`, `LaneDone`, `LaneIdle`, `LanePaused`, `ProjectHues[*]`) must clear >= 4.5:1 on `BgPrimary`, `BgSecondary`, and `BgTertiary`.3262. **Raised Chrome (`SurfaceRaised`)**:327 - `TextPrimary`, `TextSecondary`, `TextMuted`, and `KeyHintFg` must clear >= 4.5:1 on `SurfaceRaised`.328 - `TextSubtle` and `TabTextInactive` must clear >= 3.0:1 on `SurfaceRaised`.3293. **Ink on Bright Fills**:330 - For bright or pastel status/danger backgrounds (e.g. `DangerBright`, `ToastSuccess`, `ToastError`), use dark canvas ink (`#0f1113` or `#181825`) for `TextInverse` / `Toast*Text`, as white (`#ffffff`) fails contrast on light reds/yellows.331 - `DangerLight` must clear >= 4.5:1 on `DangerDark`.3324. **Text-selection highlight (`SelectionBg`)**:333 - Must clear `TargetSelectionSeparation` (currently 2.65:1) against `BgPrimary` so a selected span is findable against the shell canvas. `BgTertiary` (the selected-row fill) is not enough. Bump that constant to lift every theme at once.334 - Must stay on the same ink pole as `BgPrimary`, and `TextPrimary` must still clear >= 4.5:1 on it. Do not invert selected text or lighten the highlight until headings and syntax wash out.335 - `NormalizePalette` lifts empty, inverted, or too-dim values; author the role deliberately on curated themes.