I’d love to add these themes to this app https://terminalcolors.com/
Themes
terminalcolors.com lists 86 palettes (Dracula, Catppuccin ×4, Gruvbox ×4, Nord, Solarized, Tokyo Night ×4, Rosé Pine ×3, GitHub ×4, …) and ships each as an alacritty TOML (/downloads/alacritty/<family>-<variant>.toml: bg, fg, cursor, selection, 16 ANSI colours). Plan:
- Data:
scripts/fetch-terminal-themes.tsscrapes the index + TOMLs into a generatedlib/terminal-themes.data.ts(committed, re-runnable). Appearance (light/dark) derived from background luminance. - Mapping:
lib/terminal-themes.tsturns a palette into the app's existing tokens (--bg/--text/--fill/--borderfrom fg+bg at alpha,--accent= ANSI blue with on-accent chosen by contrast,--green/--blue/--red/--yellow/--merged+ fills from ANSI colours,--agent/--pre-bgfrom the selection colour). No component changes needed: everything already reads those vars. - Applying: keep the System | Light | Dark toggle as the mode; add a palette slot per appearance (
localStorageonly, like the current choice). The<head>init script applies the slot's derived CSS on<html style>before first paint, so no flash; mode changes and OS changes re-apply. - Picker: a
/themesgallery page (swatch preview per theme, "Use" button, reset to the built-in palette), linked from the avatar popover and /settings. Credits terminalcolors.com and links each theme to its page.
Two hardcoded dark-only colours in globals.css (--fade-to: #212121, bubble hover #8a8a8a) get moved onto tokens so custom palettes don't show vals-grey artefacts.
threadide@69252cfDone and pushed on thread/73838e62 (69252cf). All 112 terminalcolors.com schemes are now selectable at /themes (avatar menu → Themes, also linked from About).
How it works
scripts/fetch-terminal-themes.tsscrapes the site (home + family index pages, alacritty TOML downloads) into the committedlib/terminal-themes.data.ts; re-run it when the site adds themes.lib/terminal-themes.tspaletteVars()maps a palette onto the custom propertiesglobals.cssalready uses: fg at alphas for text/fills/borders, ANSI blue for the solid button and links (on-accent text picked by contrast), green/blue/red/yellow + magenta with bg-mixed fills for the status badges. No component had to change.- The System | Light | Dark switch is still the mode; each appearance now has a palette slot (
localStoragepalette:dark/palette:light, same per-browser model as the existing choice). "Use" on a tile stores the mapped CSS and switches the toggle to that appearance. The inline head script applies the slot on<html style>before first paint, so no flash; OS scheme changes and other tabs re-apply. - Tiles are drawn in their own palette (the tile sets the same vars inline), so the mini badges/button preview is exactly what the app will look like.
- Housekeeping in globals.css: dark-only hardcoded colours (
--fade-to: #212121, bubble hover#8a8a8a) became tokens, and links now go through--link(vals green by default, blue under a palette; Dracula's neon green links looked wrong).
Verified: tsc + next build; ran the built app and drove it with Playwright: Use → persisted across a reload of /about with no flash, phone layout, toggling Dark/Light swaps between the Dracula and Solarized Light slots. Screenshots attached. Not checked under a palette: the thread page and home list (need a DB); they only read the mapped tokens, so if a specific palette has a contrast miss it's a one-line tweak in paletteVars.
Open choices you may want to revisit: accent = ANSI blue (could be magenta or fg for a quieter look); the choice is per browser, not per account.
How do you get to themes?
Three ways, once the branch is deployed:
- Avatar menu → Themes. Click your avatar in the header (bottom of the sidebar on desktop, top bar on phones); the popover now has Themes between About and Sign out (
components/user-menu.tsx). - Direct URL:
/themes. The page is public and needs no DB, so it works signed out too. - About page has a "Pick a theme" link in its new paragraph about terminal colours.
On the page: Light | Dark tabs pick which slot you're filling, then "Use" on a tile. The header's System | Light | Dark switch still decides which slot is active. "Reset" on the built-in tile returns to the default vals palette.
If you're looking on the live site and don't see it: this is on PR #96 (thread/73838e62, 69252cf), which is still open, so it's only on the Vercel preview for that branch until it merges.
Can you show the design of how?
Taking that as "show me what the route to /themes looks like". I'll capture screenshots of the actual branch: the avatar popover with the new Themes item (desktop sidebar + phone), the About page link, and the /themes gallery itself with the Light | Dark tabs and Use button. No code changes unless a screenshot shows something off.
Here is the route, as it looks on the branch (screenshots attached, taken from the built app on thread/73838e62 @ 69252cf; no code changed in this step).
1. Avatar → Themes. Your avatar is the account button: bottom of the sidebar on desktop, top-right of the bar on phones. Tapping it opens the small popover, which now reads Themes / About / Sign out (phones also show your handle on top). Themes is the first item.
2. /themes. Heading, one line of explanation, then a Dark | Light switch with "Dark palette: Default" beside it telling you what's active for that slot. Below is the grid of 112 tiles (3 across on desktop, 1 on phones). Each tile is painted in its own palette: name, ↗ link to its terminalcolors.com page, the 16 ANSI swatches, a row of the forum's status badges (running / waiting / merged / failed) and a Use button, all in that theme's colours, so what you see on the tile is what the app will look like.
3. Use. Click Use; the whole page re-themes immediately (sidebar, toggle, links, cards) and the tile gets an outline and reads In use. The header's System | Light | Dark switch flips to that appearance so you see it at once. Reload any page and it's still there (applied before first paint). The first tile, "Default", is the built-in vals palette and its button says Reset.
Secondary entry points: the About page's "Prefer your terminal's colours? Pick a theme" line, and the bare URL /themes (works signed out too).
Nothing is stored server-side: the choice lives in this browser's localStorage, one slot for dark and one for light.
Merged threadide #96 by @osebo (merge, 5a6804b).








