diff --git a/packages/tui/src/component/logo.tsx b/packages/tui/src/component/logo.tsx index 13cbe3b8c6..5ade5401a8 100644 --- a/packages/tui/src/component/logo.tsx +++ b/packages/tui/src/component/logo.tsx @@ -2,9 +2,9 @@ import { RGBA, TextAttributes } from "@opentui/core" import { For } from "solid-js" import { banner } from "../logo" -// Fork: hub-style CODEV banner in uniform bold cyan, matching the codev -// hub's CLI banner (codev repo, src/components/Banner.tsx, ink "cyan"). -const BRAND = RGBA.fromHex("#00cdcd") +// Fork: hub-style CODEV banner in uniform bold teal (Tailwind cyan-600), +// the codev brand color. +const BRAND = RGBA.fromHex("#0891b2") export function Logo() { return ( diff --git a/packages/tui/src/context/theme.tsx b/packages/tui/src/context/theme.tsx index 53ccc53c34..a061c32ac2 100644 --- a/packages/tui/src/context/theme.tsx +++ b/packages/tui/src/context/theme.tsx @@ -93,7 +93,7 @@ const [store, setStore] = createStore({ themes: allThemes(), mode: "dark", lock: undefined, - active: "opencode", + active: "codev", ready: false, }) @@ -118,8 +118,8 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({ if (!lock && pick(kv.get("theme_mode")) !== undefined) kv.set("theme_mode", undefined) draft.mode = mode draft.lock = lock - const active = config.theme ?? kv.get("theme", "opencode") - draft.active = typeof active === "string" ? active : "opencode" + const active = config.theme ?? kv.get("theme", "codev") + draft.active = typeof active === "string" ? active : "codev" draft.ready = false }), ) @@ -140,7 +140,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({ }, {}), ) }) - .catch(() => setStore("active", "opencode")) + .catch(() => setStore("active", "codev")) } onMount(() => { @@ -159,7 +159,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({ if (!colors.palette[0]) { if (hasResolvedSystemTheme) return setSystemTheme(undefined) - if (store.active === "system") setStore("active", "opencode") + if (store.active === "system") setStore("active", "codev") return } const next = store.lock ?? terminalMode(colors) ?? mode @@ -174,7 +174,7 @@ export const { use: useTheme, provider: ThemeProvider } = createSimpleContext({ .catch(() => { if (hasResolvedSystemTheme) return setSystemTheme(undefined) - if (store.active === "system") setStore("active", "opencode") + if (store.active === "system") setStore("active", "codev") }) } diff --git a/packages/tui/src/theme/assets/codev.json b/packages/tui/src/theme/assets/codev.json new file mode 100644 index 0000000000..8895dc837d --- /dev/null +++ b/packages/tui/src/theme/assets/codev.json @@ -0,0 +1,245 @@ +{ + "$schema": "https://opencode.ai/theme.json", + "defs": { + "darkStep1": "#0a0a0a", + "darkStep2": "#141414", + "darkStep3": "#1e1e1e", + "darkStep4": "#282828", + "darkStep5": "#323232", + "darkStep6": "#3c3c3c", + "darkStep7": "#484848", + "darkStep8": "#606060", + "darkStep9": "#fab283", + "darkStep10": "#ffc09f", + "darkStep11": "#808080", + "darkStep12": "#eeeeee", + "darkSecondary": "#0891b2", + "darkAccent": "#9d7cd8", + "darkRed": "#e06c75", + "darkOrange": "#f5a742", + "darkGreen": "#7fd88f", + "darkCyan": "#56b6c2", + "darkYellow": "#e5c07b", + "lightStep1": "#ffffff", + "lightStep2": "#fafafa", + "lightStep3": "#f5f5f5", + "lightStep4": "#ebebeb", + "lightStep5": "#e1e1e1", + "lightStep6": "#d4d4d4", + "lightStep7": "#b8b8b8", + "lightStep8": "#a0a0a0", + "lightStep9": "#3b7dd8", + "lightStep10": "#2968c3", + "lightStep11": "#8a8a8a", + "lightStep12": "#1a1a1a", + "lightSecondary": "#7b5bb6", + "lightAccent": "#d68c27", + "lightRed": "#d1383d", + "lightOrange": "#d68c27", + "lightGreen": "#3d9a57", + "lightCyan": "#318795", + "lightYellow": "#b0851f" + }, + "theme": { + "primary": { + "dark": "darkStep9", + "light": "lightStep9" + }, + "secondary": { + "dark": "darkSecondary", + "light": "lightSecondary" + }, + "accent": { + "dark": "darkAccent", + "light": "lightAccent" + }, + "error": { + "dark": "darkRed", + "light": "lightRed" + }, + "warning": { + "dark": "darkOrange", + "light": "lightOrange" + }, + "success": { + "dark": "darkGreen", + "light": "lightGreen" + }, + "info": { + "dark": "darkCyan", + "light": "lightCyan" + }, + "text": { + "dark": "darkStep12", + "light": "lightStep12" + }, + "textMuted": { + "dark": "darkStep11", + "light": "lightStep11" + }, + "background": { + "dark": "darkStep1", + "light": "lightStep1" + }, + "backgroundPanel": { + "dark": "darkStep2", + "light": "lightStep2" + }, + "backgroundElement": { + "dark": "darkStep3", + "light": "lightStep3" + }, + "border": { + "dark": "darkStep7", + "light": "lightStep7" + }, + "borderActive": { + "dark": "darkStep8", + "light": "lightStep8" + }, + "borderSubtle": { + "dark": "darkStep6", + "light": "lightStep6" + }, + "diffAdded": { + "dark": "#4fd6be", + "light": "#1e725c" + }, + "diffRemoved": { + "dark": "#c53b53", + "light": "#c53b53" + }, + "diffContext": { + "dark": "#828bb8", + "light": "#7086b5" + }, + "diffHunkHeader": { + "dark": "#828bb8", + "light": "#7086b5" + }, + "diffHighlightAdded": { + "dark": "#b8db87", + "light": "#4db380" + }, + "diffHighlightRemoved": { + "dark": "#e26a75", + "light": "#f52a65" + }, + "diffAddedBg": { + "dark": "#20303b", + "light": "#d5e5d5" + }, + "diffRemovedBg": { + "dark": "#37222c", + "light": "#f7d8db" + }, + "diffContextBg": { + "dark": "darkStep2", + "light": "lightStep2" + }, + "diffLineNumber": { + "dark": "#8f8f8f", + "light": "#595959" + }, + "diffAddedLineNumberBg": { + "dark": "#1b2b34", + "light": "#c5d5c5" + }, + "diffRemovedLineNumberBg": { + "dark": "#2d1f26", + "light": "#e7c8cb" + }, + "markdownText": { + "dark": "darkStep12", + "light": "lightStep12" + }, + "markdownHeading": { + "dark": "darkAccent", + "light": "lightAccent" + }, + "markdownLink": { + "dark": "darkStep9", + "light": "lightStep9" + }, + "markdownLinkText": { + "dark": "darkCyan", + "light": "lightCyan" + }, + "markdownCode": { + "dark": "darkGreen", + "light": "lightGreen" + }, + "markdownBlockQuote": { + "dark": "darkYellow", + "light": "lightYellow" + }, + "markdownEmph": { + "dark": "darkYellow", + "light": "lightYellow" + }, + "markdownStrong": { + "dark": "darkOrange", + "light": "lightOrange" + }, + "markdownHorizontalRule": { + "dark": "darkStep11", + "light": "lightStep11" + }, + "markdownListItem": { + "dark": "darkStep9", + "light": "lightStep9" + }, + "markdownListEnumeration": { + "dark": "darkCyan", + "light": "lightCyan" + }, + "markdownImage": { + "dark": "darkStep9", + "light": "lightStep9" + }, + "markdownImageText": { + "dark": "darkCyan", + "light": "lightCyan" + }, + "markdownCodeBlock": { + "dark": "darkStep12", + "light": "lightStep12" + }, + "syntaxComment": { + "dark": "darkStep11", + "light": "lightStep11" + }, + "syntaxKeyword": { + "dark": "darkAccent", + "light": "lightAccent" + }, + "syntaxFunction": { + "dark": "darkStep9", + "light": "lightStep9" + }, + "syntaxVariable": { + "dark": "darkRed", + "light": "lightRed" + }, + "syntaxString": { + "dark": "darkGreen", + "light": "lightGreen" + }, + "syntaxNumber": { + "dark": "darkOrange", + "light": "lightOrange" + }, + "syntaxType": { + "dark": "darkYellow", + "light": "lightYellow" + }, + "syntaxOperator": { + "dark": "darkCyan", + "light": "lightCyan" + }, + "syntaxPunctuation": { + "dark": "darkStep12", + "light": "lightStep12" + } + } +} diff --git a/packages/tui/src/theme/assets/opencode.json b/packages/tui/src/theme/assets/opencode.json index 979e929788..e92dca8c2f 100644 --- a/packages/tui/src/theme/assets/opencode.json +++ b/packages/tui/src/theme/assets/opencode.json @@ -13,7 +13,7 @@ "darkStep10": "#ffc09f", "darkStep11": "#808080", "darkStep12": "#eeeeee", - "darkSecondary": "#00cdcd", + "darkSecondary": "#5c9cf5", "darkAccent": "#9d7cd8", "darkRed": "#e06c75", "darkOrange": "#f5a742", @@ -32,7 +32,7 @@ "lightStep10": "#2968c3", "lightStep11": "#8a8a8a", "lightStep12": "#1a1a1a", - "lightSecondary": "#009999", + "lightSecondary": "#7b5bb6", "lightAccent": "#d68c27", "lightRed": "#d1383d", "lightOrange": "#d68c27", diff --git a/packages/tui/src/theme/index.ts b/packages/tui/src/theme/index.ts index e8a5f2c5a9..b239985529 100644 --- a/packages/tui/src/theme/index.ts +++ b/packages/tui/src/theme/index.ts @@ -6,6 +6,7 @@ import catppuccinFrappe from "./assets/catppuccin-frappe.json" with { type: "jso import catppuccinMacchiato from "./assets/catppuccin-macchiato.json" with { type: "json" } import catppuccin from "./assets/catppuccin.json" with { type: "json" } import cobalt2 from "./assets/cobalt2.json" with { type: "json" } +import codev from "./assets/codev.json" with { type: "json" } import cursor from "./assets/cursor.json" with { type: "json" } import dracula from "./assets/dracula.json" with { type: "json" } import everforest from "./assets/everforest.json" with { type: "json" } @@ -128,6 +129,7 @@ export type ThemeJson = { } export const DEFAULT_THEMES: Record = { + codev, aura, ayu, catppuccin,