Design a theme that actually feels like OpenCode before you export it.
OpenCode Theme Studio is a local-first theme studio for crafting dark and light OpenCode themes with live preview, curated presets, raw JSON control, shareable links, and one-command install.
Watch the OpenCode Theme Studio demo video
- See changes in an OpenCode-like preview while you edit, instead of guessing from JSON alone.
- Tune dark and light modes as a matched pair, then export a single bundle or separate mode files.
- Start fast with built-in OpenCode themes, curated palette presets, and remix controls.
- Move from semantic editing to token-level control to raw JSON without leaving the same workflow.
- Keep drafts in your browser with IndexedDB autosave; no account or backend required.
- Share an editable link, import a local OpenCode theme, or copy a ready-to-run install command.
| Stage | Best for |
|---|---|
| Presets | Start from OpenCode built-ins, curated palettes, or remixed color directions |
| Mixer | Generate color palettes, adjust basic semantic groups like canvas, text, accent, success, warning, and danger |
| Tuner | Fine-tune individual OpenCode tokens, there are plenty of them |
| Export | Download files, copy the install command, or share an editable link |
| JSON {…} | Import yur opencode theme, Edit the generated theme json directly with validation and live preview |
- Open the app and name your theme.
- Pick a preset or randomize a palette.
- Refine colors manually or with thre levels of color shuffle. they all follow contrast ratio rules
- Flip between dark and light to tune both modes.
- Open
Saveto download files, copy a share link, or generate the OpenCode install command. - Open
{...}to import an existing local OpenCode theme or edit the full bundle JSON directly.
From the Save tab, copy the generated command and run it from your project root.
curl -fsSL https://kkugot.github.io/opencode-theme-studio/import-export.sh | bash -s -- install <theme-name> <encoded-theme>The installer:
- writes
.opencode/themes/<theme-name>.json - updates
.opencode/tui.jsonto activate the theme for that project
You can also type ! inside OpenCode, paste the generated command, and restart OpenCode once.
From the {...} tab, copy the import command and run it inside OpenCode.
curl -fsSL https://kkugot.github.io/opencode-theme-studio/import-export.sh | bash -s -- import <theme-studio-url>The import flow:
- reads your current local OpenCode theme from
.opencode/themes/or~/.config/opencode/themes/ - converts it into a Theme Studio share URL
- opens the browser with that theme already loaded in the editor
This is useful when you want to:
- build a matching light or dark companion for an existing theme
- refine a local custom theme without manually copying JSON
- share your local theme setup with someone else through a browser link
If you do not want to run the import-export script, you can also paste your current theme JSON directly into the {...} tab. Theme Studio accepts the full dark/light bundle there and keeps the JSON updated as you edit.
If you prefer file-based setup:
- Download the bundle file or the separate dark and light JSON exports.
- Save the bundle as
<theme-name>.jsonin one of these locations:~/.config/opencode/themes/<project-root>/.opencode/themes/
- In OpenCode, run
/themeand choose<theme-name>.
Optional project default in .opencode/tui.json:
{
"$schema": "https://opencode.ai/tui.json",
"theme": "<theme-name>"
}- The share link reopens the exact theme in the editor, including both dark and light modes.
- Shared URLs hydrate the editor before local draft restore, so collaborators land on the intended version immediately.
- Install and share commands use a compressed payload that contains the full dark + light theme bundle, not just the current mode.
- This repo includes
.opencode/commands/release.md, so inside OpenCode you can run/release patch,/release minor, or/release majorto follow the standard release workflow for Theme Studio.
npm install
npm run devUseful commands:
npm run testnpm run lintnpm run buildnpm run preview
- Drafts are stored locally in your browser via IndexedDB.
- Share-link, install-command, and import/export payload generation use compressed theme data and require a browser with
CompressionStreamsupport.