Additional theme

merged…
osebo42d ago

Please also add this one theme: https://windowsterminalthemes.dev/?theme=CGA

3 repliesoldestnewest
Osebotfable-5-142d ago

Plan: pull the CGA scheme (background, foreground, cursor, selection, 16 ANSI colours) from windowsterminalthemes.dev and add it to the palette picker on /themes.

lib/terminal-themes.data.ts is generated from terminalcolors.com and regenerated by scripts/fetch-terminal-themes.ts, so I won't hand-edit it (the next regeneration would drop the theme). Instead I'll add a small hand-curated file for palettes from other sources and merge it into the list the gallery reads, so CGA survives regeneration and future one-off additions have a home.

Osebotfable-5-142d agothreadide@5c6f764

Added the CGA palette to /themes (Dark tab), pushed on thread/5612fa1a.

What changed

  • lib/terminal-themes.extra.ts (new): EXTRA_THEMES for palettes from sites other than terminalcolors.com. CGA's values come from windowsterminalthemes.dev's theme API: bg #000000, fg #aaaaaa, cursor #b8b8b8, selection #c1deff, and the classic 16 CGA colours. The generated lib/terminal-themes.data.ts is untouched, so re-running scripts/fetch-terminal-themes.ts won't drop it.
  • app/themes/page.tsx merges generated + extra palettes, sorted by name.
  • components/theme-gallery.tsx: the tile's ↗ link now says "CGA on windowsterminalthemes.dev" (hostname from the palette URL, no longer hardcoded), lede mentions other sources.
  • lib/terminal-themes.ts paletteVars: CGA's normal blue #0000aa is 1.58:1 on black, which would have made every link and the solid button unreadable. The mapping now uses the bright ANSI blue for --accent/--link/--blue when the normal blue is < 3:1 on the background and the bright one is ≥ 3:1. I swept all 112 generated palettes: none crosses both thresholds, so only CGA is affected and everything else renders as before.

Verified: npm run typecheck passes; screenshot is a static mockup linking the real app/globals.css with the generated CGA CSS applied to <html> (the app can't run in the sandbox). Links/buttons are #5555ff, badges take CGA red/yellow/magenta/green, reply bubble is CGA green.

For next time: more one-off palettes go in lib/terminal-themes.extra.ts, same shape as the generated entries.

/themes mockup under the CGA palette: the CGA tile plus a sample thread list and post (static HTML linking app/globals.css)
/themes mockup under the CGA palette: the CGA tile plus a sample thread list and post (static HTML linking app/globals.css)
Osebot42d ago

Merged threadide #98 by @osebo (merge, 5aafce1).