Skip to content

[feature request] "Claude Contrast" theme: readable sidebar (spinner, idle rows, faint text) #474

Backlog

Description

@MoritzGrellner

Problem

With the built-in Claude theme the left sidebar is hard to read, while the file tree on the right reads fine. The difference is measurable. The sidebar draws most of its secondary text and marks in --color-fg-faint (#6c685f) on --color-bg-1 (#262624), which is 2.7:1, below WCAG AA for text (4.5:1) and for UI graphics (3:1). The file tree uses --color-fg at 13 px with coloured icons, which is 15:1.

Measured on the Claude theme (WCAG 2.x contrast ratio, sidebar ground bg-1 #262624):

Element How it is drawn today Contrast
Agent-working spinner (arc) fg-faint 2.7:1
Spinner track fg-faint at 25 % 1.3:1
Idle task title (no agent loaded) fg-dim under opacity-60 3.3:1
Moon glyph on an idle row fg-faint under opacity-40 1.5:1
Chevrons, counts, timestamps, legend fg-faint 2.7:1 (2.5:1 on a hovered row)
Active task title fg-dim on sel 4.6:1

The running spinner is the mark I look for most often, and it is the hardest one to see. In the sidebar code text-[var(--color-fg-faint)] appears 78 times, more than fg (64).

Two of these cannot be fixed by a theme at all: the idle row and its moon are dimmed with opacity-60 / opacity-40 at the point of use, so whatever value a custom theme sets is multiplied down again.

Proposal

  1. A built-in "Claude Contrast" theme next to Claude. Same surfaces, same terracotta accent, only the text ladder and borders lifted so every text token clears AA on every surface it sits on.
  2. Three new themeable keys that replace the opacities, with defaults that reproduce today's colours exactly, so no existing theme changes:
    • fg-idle – idle task title (default: fg-dim mixed 60 % into bg-1)
    • mark-idle – moon glyph (default: fg-faint mixed 40 % into bg-1)
    • mark-working – agent-working spinner (default: fg-faint)

Claude Contrast, same grounds as Claude:

Token Claude Claude Contrast on bg-1
fg-dim #b0a89a (6.4:1) #cfc8bb 9.1:1
fg-faint #6c685f (2.7:1) #a19a8e 5.4:1 (4.6:1 on bg-3)
loc #8c8985 (4.4:1) #aaa49a 6.1:1
accent #d97757 (4.9:1) #e2855f 5.6:1
bg-3 #2f2d2a #34312d one step further from bg-1, so hovered/active rows separate
border / border-soft 10 % / 5 % 16 % / 9 %
mark-working fg-faint (2.7:1) accent 5.6:1
fg-idle 3.3:1 fg-faint 5.4:1
mark-idle 1.5:1 fg-faint 70 % 3.4:1
terminal brightBlack #6e747e (3.6:1 on bg) #8a8f98 5.3:1

The ladder keeps its three steps (fg 13.8 → dim 9.1 → faint 5.4), so the hierarchy is still there; only the floor moved up. A running task now shows a terracotta spinner, which is the one thing in the sidebar you scan for.

Patch

A complete patch against main (4c609fb) is attached below. 9 files, +107 / −11:

  • src/index.css: the three new tokens in @theme (defaults = today's look) and the html.claude-contrast block
  • src/store/prefs.ts: claude-contrast in BuiltinThemeMode / ResolvedTheme / VALID_MODES, its terminal palette, class toggle
  • src/hooks/useThemeEntries.ts: label and order
  • src/lib/customTheme.ts: the keys in UI_KEYS, and deriveChrome derives them so Ghostty/Warp imports look exactly as before
  • src/components/TaskWorkBadge.tsx: working spinner uses --color-mark-working
  • src/components/sidebar/Sidebar.tsx: moon uses --color-mark-idle, idle row uses --color-fg-idle instead of opacity-60
  • src-tauri/assets/themes/example.json.sample, docs/themes.md: the new keys documented
  • src/store/prefs.test.ts: dark-family list

npx tsc -b is clean and npx vitest run passes (258 files, 3993 tests).

One behaviour change to flag: opacity-60 used to dim the whole idle row, badges included. With the token only the title and moon are quieter, which I think is right, since the badges carry state.

The same theme also works today as a custom file (~/.config/termic/themes/claude-contrast.json, attached), except for the three new keys, which need the patch.

claude-contrast.patch
diff --git a/docs/themes.md b/docs/themes.md
index 5b5ac60..fb2a856 100644
--- a/docs/themes.md
+++ b/docs/themes.md
@@ -177,6 +177,9 @@ just `bg` and `accent` and still look coherent.
 | `ok-fg` | ink on a solid `ok` fill (toggle knobs). Defaults to white |
 | `warn` | warning yellow |
 | `err` | error red |
+| `fg-idle` | title of an idle task row in the sidebar (no agent loaded). Defaults to `fg-dim` mixed 60 % into `bg-1`, the look it had as `opacity-60` |
+| `mark-idle` | the moon glyph on an idle task row. Defaults to `fg-faint` mixed 40 % into `bg-1` |
+| `mark-working` | the agent-working spinner on sidebar, dashboard and tab rows. Defaults to `fg-faint`; set your accent to make running tasks stand out |
 | `palette-red` … `palette-pink` | hue-named accent ramp for user-assigned marks (today: project-group folder colors). 8 keys: `palette-red`, `palette-orange`, `palette-yellow`, `palette-green`, `palette-teal`, `palette-blue`, `palette-purple`, `palette-pink`. Tune shades to your theme, but keep each hue recognizable: users pick colors by name and expect "red" to stay red across themes |
 
 The `--color-cli-*` agent tint variables are not themeable in v1; they keep
diff --git a/src-tauri/assets/themes/example.json.sample b/src-tauri/assets/themes/example.json.sample
index 36ac8a1..3c6fb60 100644
--- a/src-tauri/assets/themes/example.json.sample
+++ b/src-tauri/assets/themes/example.json.sample
@@ -21,6 +21,9 @@
     "ok-fg": "#232136",
     "warn": "#f6c177",
     "err": "#eb6f92",
+    "fg-idle": "#908caa",
+    "mark-idle": "#6e6a86",
+    "mark-working": "#c4a7e7",
     "palette-red": "#eb6f92",
     "palette-orange": "#e89f6f",
     "palette-yellow": "#f6c177",
diff --git a/src/components/TaskWorkBadge.tsx b/src/components/TaskWorkBadge.tsx
index 6f045ad..0a25c9d 100644
--- a/src/components/TaskWorkBadge.tsx
+++ b/src/components/TaskWorkBadge.tsx
@@ -86,7 +86,7 @@ export function TaskWorkBadge(
       <span
         data-testid={testId}
         data-work-state="working"
-        className="shrink-0 flex items-center justify-center text-[var(--color-fg-faint)]"
+        className="shrink-0 flex items-center justify-center text-[var(--color-mark-working)]"
         title={t("taskWorkBadge.working")}
         aria-label={t("taskWorkBadge.workingAria")}
       >
diff --git a/src/components/sidebar/Sidebar.tsx b/src/components/sidebar/Sidebar.tsx
index 4914de9..0b35df0 100644
--- a/src/components/sidebar/Sidebar.tsx
+++ b/src/components/sidebar/Sidebar.tsx
@@ -3454,14 +3454,18 @@ function TaskRow({ w, compact, dragging = false, dragTy = 0, onDragPointerDown,
             ? "bg-[var(--color-sel)] text-[var(--color-fg)]"
             : isActive
             ? "text-[var(--color-fg)] hover:bg-[var(--color-hover)]"
+            // Idle (not loaded) rows take their own token instead of
+            // `opacity-60` over fg-dim: an opacity multiplies whatever the
+            // theme sets, so no theme could make these rows readable.
+            : !isLoaded
+            ? "text-[var(--color-fg-idle)] hover:bg-[var(--color-hover)] hover:text-[var(--color-fg)]"
             : "text-[var(--color-fg-dim)] hover:bg-[var(--color-hover)] hover:text-[var(--color-fg)]",
-          !isLoaded && "opacity-60",
           // Lifted look while dragging, mirroring the project header.
           dragging && "bg-[var(--color-accent)]/15 text-[var(--color-accent)] shadow-lg",
         )}
       >
         {terminalTabs.length === 0
-          ? <Moon className="shrink-0 h-3.5 w-3.5 mx-0.5 text-[var(--color-fg-faint)] opacity-40" />
+          ? <Moon className="shrink-0 h-3.5 w-3.5 mx-0.5 text-[var(--color-mark-idle)]" />
           : <button
               onClick={(e) => { e.stopPropagation(); setTaskCollapsed(w.id, !collapsed); }}
               className="shrink-0 rounded p-0.5 hover:bg-[var(--color-bg-3)] transition-colors"
diff --git a/src/hooks/useThemeEntries.ts b/src/hooks/useThemeEntries.ts
index 5814c47..1012396 100644
--- a/src/hooks/useThemeEntries.ts
+++ b/src/hooks/useThemeEntries.ts
@@ -17,13 +17,14 @@ const SCHEME_RANK: Record<ThemeEntry["scheme"], number> = { system: 0, dark: 1,
 // theme names, the same in every language.
 const THEME_LABELS: Record<Exclude<BuiltinThemeMode, "auto" | "light" | "dark">, string> = {
   claude: "Claude",
+  "claude-contrast": "Claude Contrast",
   solarized: "Solarized",
   cobalt: "Cobalt",
   matrix: "Matrix",
   rosepine: "Rosé Pine",
   monokai: "Monokai",
 };
-const THEME_ORDER: BuiltinThemeMode[] = ["auto", "light", "dark", "claude", "solarized", "cobalt", "matrix", "rosepine", "monokai"];
+const THEME_ORDER: BuiltinThemeMode[] = ["auto", "light", "dark", "claude", "claude-contrast", "solarized", "cobalt", "matrix", "rosepine", "monokai"];
 
 export function useThemeEntries(): ThemeEntry[] {
   const { t } = useTranslation("dialogs");
diff --git a/src/index.css b/src/index.css
index 21f3f84..e0783e1 100644
--- a/src/index.css
+++ b/src/index.css
@@ -149,6 +149,19 @@
      (link = main checkout, branch = worktree) carries the distinction. */
   --color-loc:  #8c8985;
 
+  /* Sidebar status marks, as tokens rather than opacity at the point of use.
+     The idle task row used to be `fg-dim` under `opacity-60` and its moon
+     glyph `fg-faint` under `opacity-40`: an opacity multiplies whatever a
+     theme sets, so no theme could lift either one (Claude: 3.3:1 and 1.5:1
+     on --color-bg-1). The defaults below reproduce those exact colours, so
+     no existing theme changes; a theme that wants more contrast now sets
+     the key instead of fighting a multiplier.
+     `mark-working` is the agent-working spinner. It stays `fg-faint` by
+     default; a theme can give it its accent so a running task stands out. */
+  --color-fg-idle:      color-mix(in srgb, var(--color-fg-dim) 60%, var(--color-bg-1));
+  --color-mark-idle:    color-mix(in srgb, var(--color-fg-faint) 40%, var(--color-bg-1));
+  --color-mark-working: var(--color-fg-faint);
+
   --color-cli-claude:  #d97757;
   --color-cli-codex:   #16a34a;
   --color-cli-agy:     #8b5cf6;
@@ -336,6 +349,52 @@
     color-scheme: dark;
   }
 
+  /* "Claude Contrast": the Claude theme with the same surfaces and
+     terracotta accent, tuned for reading. Every text token clears WCAG AA
+     on every surface it sits on, the sidebar (--color-bg-1) included:
+       fg 13.8:1 · fg-dim 9.1:1 · fg-faint 5.4:1 · accent 5.6:1 on bg-1
+       fg-faint 4.6:1 on bg-3 (hover/active rows)
+     The stock Claude theme has fg-faint at 2.7:1 on the sidebar, which is
+     what the working spinner, chevrons, counts and timestamps are drawn
+     in. The ladder keeps its three steps; only the floor moved up. */
+  html.claude-contrast {
+    --color-bg:          #1f1e1d;
+    --color-bg-1:        #262624;
+    --color-bg-2:        #2d2b28;
+    --color-bg-3:        #34312d;       /* one stop further from bg-1 so the active row reads */
+    --color-fg:          #f5f4ee;
+    --color-fg-dim:      #cfc8bb;
+    --color-fg-faint:    #a19a8e;
+    --color-loc:         #aaa49a;
+    --color-border:      rgba(245, 244, 238, 0.16);
+    --color-border-soft: rgba(245, 244, 238, 0.09);
+    --color-hover:       rgba(245, 244, 238, 0.06);
+    --color-sel:         rgba(226, 133, 95, 0.18);
+    --color-accent:      #e2855f;
+    --color-accent-soft: rgba(226, 133, 95, 0.20);
+    --color-accent-deep: #b35e3f;
+    --color-accent-fg:   #1f1e1d;
+    --color-ok:          #8cc47a;
+    --color-ok-fg:       #1f1e1d;
+    --color-warn:        #f0b84f;
+    --color-err:         #f07a6e;
+    /* Idle rows: fg-faint at full strength (5.4:1), not dimmed fg-dim. The
+       moon stays a step quieter than the title but clears 3:1 (non-text). */
+    --color-fg-idle:      var(--color-fg-faint);
+    --color-mark-idle:    color-mix(in srgb, var(--color-fg-faint) 70%, var(--color-bg-1));
+    /* A running agent is the one thing in the sidebar you look for. */
+    --color-mark-working: var(--color-accent);
+    --color-palette-red:    #f07a6e;
+    --color-palette-orange: #eb9a5f;
+    --color-palette-yellow: #e6bd5c;
+    --color-palette-green:  #8cc47a;
+    --color-palette-teal:   #5cc0ae;
+    --color-palette-blue:   #7fb4ea;
+    --color-palette-purple: #b494e6;
+    --color-palette-pink:   #e08cbf;
+    color-scheme: dark;
+  }
+
   /* Cobalt — Wes Bos's Cobalt 2 palette. Deep navy surfaces with a
      bright sky-blue chrome accent (Cobalt the element is blue; the
      accent should match the name). Yellow #ffc600 is Cobalt 2's
diff --git a/src/lib/customTheme.ts b/src/lib/customTheme.ts
index 1b39648..9b3aada 100644
--- a/src/lib/customTheme.ts
+++ b/src/lib/customTheme.ts
@@ -47,6 +47,10 @@ export const UI_KEYS = [
   "hover", "sel",
   "accent", "accent-soft", "accent-deep", "accent-fg",
   "ok", "ok-fg", "warn", "err",
+  // Sidebar status marks (index.css explains why these are tokens). Their
+  // defaults derive from fg-dim / fg-faint, so a theme that omits them
+  // looks exactly as before.
+  "fg-idle", "mark-idle", "mark-working",
   // Palette ramp: hue-named accents for user-assigned marks (project-group
   // folders consume it). Optional like everything else — omitted keys keep
   // the built-in hues. Tune shades to your theme but keep hues recognizable.
@@ -232,14 +236,22 @@ export function deriveChrome(
   // surfaces step toward fg; light themes need a slightly bigger step to
   // read, since the eye is less sensitive to small changes near white
   const step = dark ? 1 : 1.3;
+  const bg1 = mix(bg, fg, 0.04 * step);
+  const fgDim = mix(fg, bg, 0.3);
+  const fgFaint = mix(fg, bg, 0.52);
   const ui: Record<string, string> = {
     bg: toHex(bg),
-    "bg-1": toHex(mix(bg, fg, 0.04 * step)),
+    "bg-1": toHex(bg1),
     "bg-2": toHex(mix(bg, fg, 0.07 * step)),
     "bg-3": toHex(mix(bg, fg, 0.12 * step)),
     fg: toHex(fg),
-    "fg-dim": toHex(mix(fg, bg, 0.3)),
-    "fg-faint": toHex(mix(fg, bg, 0.52)),
+    "fg-dim": toHex(fgDim),
+    "fg-faint": toHex(fgFaint),
+    // The same values index.css derives with color-mix, so an import looks
+    // exactly as it did before these were keys.
+    "fg-idle": toHex(mix(fgDim, bg1, 0.4)),
+    "mark-idle": toHex(mix(fgFaint, bg1, 0.6)),
+    "mark-working": toHex(fgFaint),
     border: toHex(mix(bg, fg, 0.17 * step)),
     "border-soft": toHex(mix(bg, fg, 0.09 * step)),
     hover: rgba(fg, dark ? 0.045 : 0.05),
diff --git a/src/store/prefs.test.ts b/src/store/prefs.test.ts
index e8c090b..7d2bdcf 100644
--- a/src/store/prefs.test.ts
+++ b/src/store/prefs.test.ts
@@ -403,7 +403,7 @@ describe("prefs: currentMinimumContrastRatio", () => {
 
   it("returns 1 (off) for dark-family themes", async () => {
     const { usePrefs, currentMinimumContrastRatio } = await import("./prefs");
-    for (const mode of ["dark", "claude", "solarized", "cobalt", "matrix", "rosepine", "monokai"] as const) {
+    for (const mode of ["dark", "claude", "claude-contrast", "solarized", "cobalt", "matrix", "rosepine", "monokai"] as const) {
       usePrefs.getState().setThemeMode(mode);
       expect(currentMinimumContrastRatio()).toBe(1);
     }
diff --git a/src/store/prefs.ts b/src/store/prefs.ts
index 04879df..074c1b1 100644
--- a/src/store/prefs.ts
+++ b/src/store/prefs.ts
@@ -184,16 +184,16 @@ export const parseTerminalRenderer = (
 ): TerminalRendererKind =>
   v === "webgl" || v === "canvas" || v === "dom" ? v : fallback;
 
-export type BuiltinThemeMode = "auto" | "light" | "dark" | "claude" | "solarized" | "cobalt" | "matrix" | "rosepine" | "monokai";
+export type BuiltinThemeMode = "auto" | "light" | "dark" | "claude" | "claude-contrast" | "solarized" | "cobalt" | "matrix" | "rosepine" | "monokai";
 /** The user's selection: a built-in mode, or a custom theme file id
  *  (`custom:<file-stem>`, see lib/customTheme.ts). */
 export type ThemeMode = BuiltinThemeMode | `custom:${string}`;
 /** What `applyTheme` resolves a BUILT-IN mode to: a concrete palette name.
  *  `auto` is never returned; it gets mapped to light/dark based on OS
  *  preference. Custom ids resolve to themselves (see resolveThemeFull). */
-export type ResolvedTheme = "light" | "dark" | "claude" | "solarized" | "cobalt" | "matrix" | "rosepine" | "monokai";
+export type ResolvedTheme = "light" | "dark" | "claude" | "claude-contrast" | "solarized" | "cobalt" | "matrix" | "rosepine" | "monokai";
 
-const VALID_MODES: ReadonlyArray<BuiltinThemeMode> = ["auto", "light", "dark", "claude", "solarized", "cobalt", "matrix", "rosepine", "monokai"];
+const VALID_MODES: ReadonlyArray<BuiltinThemeMode> = ["auto", "light", "dark", "claude", "claude-contrast", "solarized", "cobalt", "matrix", "rosepine", "monokai"];
 /** Defensive parse: localStorage may hold a theme id that's been
  *  removed in a later version. Fall back to "claude" (the default
  *  theme) instead of letting the unknown string flow through and
@@ -238,6 +238,19 @@ export const TERMINAL_THEMES: Record<ResolvedTheme, Record<string, string>> = {
     brightBlack: "#6e747e", brightRed: "#ff6b66", brightGreen: "#7cd57e", brightYellow: "#ffd166",
     brightBlue: "#7fb1ff", brightMagenta: "#d7a4ff", brightCyan: "#67e8f9", brightWhite: "#ffffff",
   },
+  "claude-contrast": {
+    // Claude's terminal with the ANSI grey lifted: brightBlack #6e747e is
+    // 3.6:1 on #1f1e1d, too faint for the dimmed text agents print in it.
+    background: "#1f1e1d",
+    foreground: "#f5f4ee",
+    cursor: "#e2855f",
+    cursorAccent: "#1f1e1d",
+    selectionBackground: "rgba(51,117,240,0.75)",
+    black: "#1a1918", red: "#ef5350", green: "#4caf50", yellow: "#f0b13a",
+    blue: "#4c8bf5", magenta: "#c084fc", cyan: "#22d3ee", white: "#f5f4ee",
+    brightBlack: "#8a8f98", brightRed: "#ff6b66", brightGreen: "#7cd57e", brightYellow: "#ffd166",
+    brightBlue: "#7fb1ff", brightMagenta: "#d7a4ff", brightCyan: "#67e8f9", brightWhite: "#ffffff",
+  },
   light: {
     background: "#faf9f6",
     foreground: "#1c1b1a",
@@ -2358,6 +2371,7 @@ export function applyTheme(mode: ThemeMode) {
   html.classList.toggle("light",     custom ? custom.colorScheme === "light" : resolved === "light");
   html.classList.toggle("dark",      resolved === "dark");
   html.classList.toggle("claude",    resolved === "claude");
+  html.classList.toggle("claude-contrast", resolved === "claude-contrast");
   html.classList.toggle("solarized", resolved === "solarized");
   html.classList.toggle("cobalt",    resolved === "cobalt");
   html.classList.toggle("matrix",    resolved === "matrix");
claude-contrast.json (custom theme file)
{
  "name": "Claude Contrast",
  "colorScheme": "dark",
  "ui": {
    "bg": "#1f1e1d",
    "bg-1": "#262624",
    "bg-2": "#2d2b28",
    "bg-3": "#34312d",
    "fg": "#f5f4ee",
    "fg-dim": "#cfc8bb",
    "fg-faint": "#a19a8e",
    "border": "rgba(245,244,238,0.16)",
    "border-soft": "rgba(245,244,238,0.09)",
    "hover": "rgba(245,244,238,0.06)",
    "sel": "rgba(226,133,95,0.18)",
    "accent": "#e2855f",
    "accent-soft": "rgba(226,133,95,0.20)",
    "accent-deep": "#b35e3f",
    "accent-fg": "#1f1e1d",
    "ok": "#8cc47a",
    "ok-fg": "#1f1e1d",
    "warn": "#f0b84f",
    "err": "#f07a6e",
    "palette-red": "#f07a6e",
    "palette-orange": "#eb9a5f",
    "palette-yellow": "#e6bd5c",
    "palette-green": "#8cc47a",
    "palette-teal": "#5cc0ae",
    "palette-blue": "#7fb4ea",
    "palette-purple": "#b494e6",
    "palette-pink": "#e08cbf"
  },
  "terminal": {
    "background": "#1f1e1d",
    "foreground": "#f5f4ee",
    "cursor": "#e2855f",
    "cursorAccent": "#1f1e1d",
    "selectionBackground": "rgba(51,117,240,0.75)",
    "black": "#1a1918", "red": "#ef5350", "green": "#4caf50", "yellow": "#f0b13a",
    "blue": "#4c8bf5", "magenta": "#c084fc", "cyan": "#22d3ee", "white": "#f5f4ee",
    "brightBlack": "#8a8f98", "brightRed": "#ff6b66", "brightGreen": "#7cd57e", "brightYellow": "#ffd166",
    "brightBlue": "#7fb1ff", "brightMagenta": "#d7a4ff", "brightCyan": "#67e8f9", "brightWhite": "#ffffff"
  }
}

Termic 2.1.2 (macOS aarch64), patch written against main 4c609fb.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions