Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions packages/opencode/src/cli/cmd/tui/context/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,58 @@ import vercel from "./theme/vercel.json" with { type: "json" }
import vesper from "./theme/vesper.json" with { type: "json" }
import zenburn from "./theme/zenburn.json" with { type: "json" }
import carbonfox from "./theme/carbonfox.json" with { type: "json" }
import mellow from "./theme/mellow.json" with { type: "json" }
import midnight from "./theme/midnight.json" with { type: "json" }
import tokyoNight from "./theme/tokyo-night.json" with { type: "json" }
import auraTransparent from "./theme/aura--transparent.json" with { type: "json" }
import ayuTransparent from "./theme/ayu--transparent.json" with { type: "json" }
import catppuccinTransparent from "./theme/catppuccin--transparent.json" with { type: "json" }
import cobaltTransparent from "./theme/cobalt--transparent.json" with { type: "json" }
import cyberpunk2077 from "./theme/cyberpunk2077.json" with { type: "json" }
import cyberpunk2077Transparent from "./theme/cyberpunk2077--transparent.json" with { type: "json" }
import draculaTransparent from "./theme/dracula--transparent.json" with { type: "json" }
import everforestTransparent from "./theme/everforest--transparent.json" with { type: "json" }
import githubTransparent from "./theme/github--transparent.json" with { type: "json" }
import gruvboxTransparent from "./theme/gruvbox--transparent.json" with { type: "json" }
import kanagawaTransparent from "./theme/kanagawa--transparent.json" with { type: "json" }
import materialTransparent from "./theme/material--transparent.json" with { type: "json" }
import matrixTransparent from "./theme/matrix--transparent.json" with { type: "json" }
import mellowTransparent from "./theme/mellow--transparent.json" with { type: "json" }
import midnightTransparent from "./theme/midnight--transparent.json" with { type: "json" }
import monokaiTransparent from "./theme/monokai--transparent.json" with { type: "json" }
import moonlight from "./theme/moonlight.json" with { type: "json" }
import moonlightTransparent from "./theme/moonlight--transparent.json" with { type: "json" }
import moonlightEclipse from "./theme/moonlight-eclipse.json" with { type: "json" }
import moonlightEclipseTransparent from "./theme/moonlight-eclipse--transparent.json" with { type: "json" }
import moonlightIi from "./theme/moonlight-ii.json" with { type: "json" }
import moonlightIiTransparent from "./theme/moonlight-ii--transparent.json" with { type: "json" }
import moonlightIii from "./theme/moonlight-iii.json" with { type: "json" }
import moonlightIiiTransparent from "./theme/moonlight-iii--transparent.json" with { type: "json" }
import nightowlTransparent from "./theme/nightowl--transparent.json" with { type: "json" }
import nordTransparent from "./theme/nord--transparent.json" with { type: "json" }
import onedarkTransparent from "./theme/one-dark--transparent.json" with { type: "json" }
import opencodeTransparent from "./theme/opencode--transparent.json" with { type: "json" }
import palenightTransparent from "./theme/palenight--transparent.json" with { type: "json" }
import rosepineTransparent from "./theme/rosepine--transparent.json" with { type: "json" }
import solarizedTransparent from "./theme/solarized--transparent.json" with { type: "json" }
import synthwave84Transparent from "./theme/synthwave84--transparent.json" with { type: "json" }
import tokyoNightTransparent from "./theme/tokyo-night--transparent.json" with { type: "json" }
import vesperTransparent from "./theme/vesper--transparent.json" with { type: "json" }
import zenburnTransparent from "./theme/zenburn--transparent.json" with { type: "json" }
import carbonfoxTransparent from "./theme/carbonfox--transparent.json" with { type: "json" }
import catppuccinFrappeTransparent from "./theme/catppuccin-frappe--transparent.json" with { type: "json" }
import catppuccinMacchiatoTransparent from "./theme/catppuccin-macchiato--transparent.json" with { type: "json" }
import cobalt2Transparent from "./theme/cobalt2--transparent.json" with { type: "json" }
import cursorTransparent from "./theme/cursor--transparent.json" with { type: "json" }
import flexokiTransparent from "./theme/flexoki--transparent.json" with { type: "json" }
import lucentOrngTransparent from "./theme/lucent-orng--transparent.json" with { type: "json" }
import mercuryTransparent from "./theme/mercury--transparent.json" with { type: "json" }
import orngTransparent from "./theme/orng--transparent.json" with { type: "json" }
import osakaJadeTransparent from "./theme/osaka-jade--transparent.json" with { type: "json" }
import tokyonightTransparent from "./theme/tokyonight--transparent.json" with { type: "json" }
import vercelTransparent from "./theme/vercel--transparent.json" with { type: "json" }
import toxikat from "./theme/toxikat.json" with { type: "json" }
import toxikatTransparent from "./theme/toxikat--transparent.json" with { type: "json" }
import { useKV } from "./kv"
import { useRenderer } from "@opentui/solid"
import { createStore, produce } from "solid-js/store"
Expand Down Expand Up @@ -172,6 +224,58 @@ export const DEFAULT_THEMES: Record<string, ThemeJson> = {
vercel,
zenburn,
carbonfox,
["aura--transparent"]: auraTransparent,
["ayu--transparent"]: ayuTransparent,
["catppuccin--transparent"]: catppuccinTransparent,
["cobalt--transparent"]: cobaltTransparent,
cyberpunk2077,
["cyberpunk2077--transparent"]: cyberpunk2077Transparent,
["dracula--transparent"]: draculaTransparent,
["everforest--transparent"]: everforestTransparent,
["github--transparent"]: githubTransparent,
["gruvbox--transparent"]: gruvboxTransparent,
["kanagawa--transparent"]: kanagawaTransparent,
["material--transparent"]: materialTransparent,
["matrix--transparent"]: matrixTransparent,
["mellow"]: mellow,
["mellow--transparent"]: mellowTransparent,
["midnight"]: midnight,
["midnight--transparent"]: midnightTransparent,
["monokai--transparent"]: monokaiTransparent,
moonlight,
["moonlight--transparent"]: moonlightTransparent,
["moonlight-eclipse"]: moonlightEclipse,
["moonlight-eclipse--transparent"]: moonlightEclipseTransparent,
["moonlight-ii"]: moonlightIi,
["moonlight-ii--transparent"]: moonlightIiTransparent,
["moonlight-iii"]: moonlightIii,
["moonlight-iii--transparent"]: moonlightIiiTransparent,
["nightowl--transparent"]: nightowlTransparent,
["nord--transparent"]: nordTransparent,
["one-dark--transparent"]: onedarkTransparent,
["opencode--transparent"]: opencodeTransparent,
["palenight--transparent"]: palenightTransparent,
["rosepine--transparent"]: rosepineTransparent,
["solarized--transparent"]: solarizedTransparent,
["synthwave84--transparent"]: synthwave84Transparent,
["tokyo-night"]: tokyoNight,
["tokyo-night--transparent"]: tokyoNightTransparent,
["vesper--transparent"]: vesperTransparent,
["zenburn--transparent"]: zenburnTransparent,
["carbonfox--transparent"]: carbonfoxTransparent,
["catppuccin-frappe--transparent"]: catppuccinFrappeTransparent,
["catppuccin-macchiato--transparent"]: catppuccinMacchiatoTransparent,
["cobalt2--transparent"]: cobalt2Transparent,
["cursor--transparent"]: cursorTransparent,
["flexoki--transparent"]: flexokiTransparent,
["lucent-orng--transparent"]: lucentOrngTransparent,
["mercury--transparent"]: mercuryTransparent,
["orng--transparent"]: orngTransparent,
["osaka-jade--transparent"]: osakaJadeTransparent,
["tokyonight--transparent"]: tokyonightTransparent,
["vercel--transparent"]: vercelTransparent,
["toxikat"]: toxikat,
["toxikat--transparent"]: toxikatTransparent,
}

function resolveTheme(theme: ThemeJson, mode: "dark" | "light") {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"$schema": "https://opencode.ai/theme.json",
"defs": {
"darkBg": "#0f0f0f",
"darkBgPanel": "#15141b",
"darkBorder": "#2d2d2d",
"darkFgMuted": "#6d6d6d",
"darkFg": "#edecee",
"purple": "#a277ff",
"pink": "#f694ff",
"blue": "#82e2ff",
"red": "#ff6767",
"orange": "#ffca85",
"cyan": "#61ffca",
"green": "#9dff65"
},
"theme": {
"primary": "purple",
"secondary": "pink",
"accent": "purple",
"error": "red",
"warning": "orange",
"success": "cyan",
"info": "purple",
"text": "darkFg",
"textMuted": "darkFgMuted",
"background": "none",
"backgroundPanel": "darkBgPanel",
"backgroundElement": "darkBgPanel",
"border": "darkBorder",
"borderActive": "darkFgMuted",
"borderSubtle": "darkBorder",
"diffAdded": "cyan",
"diffRemoved": "red",
"diffContext": "darkFgMuted",
"diffHunkHeader": "darkFgMuted",
"diffHighlightAdded": "cyan",
"diffHighlightRemoved": "red",
"diffAddedBg": "#354933",
"diffRemovedBg": "#3f191a",
"diffContextBg": "darkBgPanel",
"diffLineNumber": "darkBorder",
"diffAddedLineNumberBg": "#162620",
"diffRemovedLineNumberBg": "#26161a",
"markdownText": "darkFg",
"markdownHeading": "purple",
"markdownLink": "pink",
"markdownLinkText": "purple",
"markdownCode": "cyan",
"markdownBlockQuote": "darkFgMuted",
"markdownEmph": "orange",
"markdownStrong": "purple",
"markdownHorizontalRule": "darkFgMuted",
"markdownListItem": "purple",
"markdownListEnumeration": "purple",
"markdownImage": "pink",
"markdownImageText": "purple",
"markdownCodeBlock": "darkFg",
"syntaxComment": "darkFgMuted",
"syntaxKeyword": "pink",
"syntaxFunction": "purple",
"syntaxVariable": "purple",
"syntaxString": "cyan",
"syntaxNumber": "green",
"syntaxType": "purple",
"syntaxOperator": "pink",
"syntaxPunctuation": "darkFg",
"placeholderText": "#f00",
"thinkingOpacity": 0.55
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"$schema": "https://opencode.ai/theme.json",
"defs": {
"darkBg": "#0B0E14",
"darkBgAlt": "#0D1017",
"darkLine": "#11151C",
"darkPanel": "#0F131A",
"darkFg": "#BFBDB6",
"darkFgMuted": "#565B66",
"darkGutter": "#6C7380",
"darkTag": "#39BAE6",
"darkFunc": "#FFB454",
"darkEntity": "#59C2FF",
"darkString": "#AAD94C",
"darkRegexp": "#95E6CB",
"darkMarkup": "#F07178",
"darkKeyword": "#FF8F40",
"darkSpecial": "#E6B673",
"darkComment": "#ACB6BF",
"darkConstant": "#D2A6FF",
"darkOperator": "#F29668",
"darkAdded": "#7FD962",
"darkRemoved": "#F26D78",
"darkAccent": "#E6B450",
"darkError": "#D95757",
"darkIndentActive": "#6C7380"
},
"theme": {
"primary": "darkEntity",
"secondary": "darkConstant",
"accent": "darkAccent",
"error": "darkError",
"warning": "darkSpecial",
"success": "darkAdded",
"info": "darkTag",
"text": "darkFg",
"textMuted": "darkFgMuted",
"background": "none",
"backgroundPanel": "darkPanel",
"backgroundElement": "darkBgAlt",
"border": "darkGutter",
"borderActive": "darkIndentActive",
"borderSubtle": "darkLine",
"diffAdded": "darkAdded",
"diffRemoved": "darkRemoved",
"diffContext": "darkComment",
"diffHunkHeader": "darkComment",
"diffHighlightAdded": "darkString",
"diffHighlightRemoved": "darkMarkup",
"diffAddedBg": "#20303b",
"diffRemovedBg": "#37222c",
"diffContextBg": "darkPanel",
"diffLineNumber": "darkGutter",
"diffAddedLineNumberBg": "#1b2b34",
"diffRemovedLineNumberBg": "#2d1f26",
"markdownText": "darkFg",
"markdownHeading": "darkConstant",
"markdownLink": "darkEntity",
"markdownLinkText": "darkTag",
"markdownCode": "darkString",
"markdownBlockQuote": "darkSpecial",
"markdownEmph": "darkSpecial",
"markdownStrong": "darkFunc",
"markdownHorizontalRule": "darkFgMuted",
"markdownListItem": "darkEntity",
"markdownListEnumeration": "darkTag",
"markdownImage": "darkEntity",
"markdownImageText": "darkTag",
"markdownCodeBlock": "darkFg",
"syntaxComment": "darkComment",
"syntaxKeyword": "darkKeyword",
"syntaxFunction": "darkFunc",
"syntaxVariable": "darkEntity",
"syntaxString": "darkString",
"syntaxNumber": "darkConstant",
"syntaxType": "darkSpecial",
"syntaxOperator": "darkOperator",
"syntaxPunctuation": "darkFg"
}
}
Loading