diff --git a/packages/opencode/src/cli/cmd/tui/context/theme.tsx b/packages/opencode/src/cli/cmd/tui/context/theme.tsx index 24d122162a..42dff833dd 100644 --- a/packages/opencode/src/cli/cmd/tui/context/theme.tsx +++ b/packages/opencode/src/cli/cmd/tui/context/theme.tsx @@ -18,6 +18,7 @@ import gruvbox from "./theme/gruvbox.json" with { type: "json" } import kanagawa from "./theme/kanagawa.json" with { type: "json" } import material from "./theme/material.json" with { type: "json" } import matrix from "./theme/matrix.json" with { type: "json" } +import opencraft from "./theme/opencraft.json" with { type: "json" } import mercury from "./theme/mercury.json" with { type: "json" } import monokai from "./theme/monokai.json" with { type: "json" } import nightowl from "./theme/nightowl.json" with { type: "json" } @@ -101,6 +102,7 @@ export const DEFAULT_THEMES: Record = { kanagawa, material, matrix, + opencraft, mercury, monokai, nightowl, diff --git a/packages/opencode/src/cli/cmd/tui/context/theme/opencraft.json b/packages/opencode/src/cli/cmd/tui/context/theme/opencraft.json new file mode 100644 index 0000000000..ecc4e86575 --- /dev/null +++ b/packages/opencode/src/cli/cmd/tui/context/theme/opencraft.json @@ -0,0 +1,86 @@ +{ + "$schema": "https://opencode.ai/theme.json", + "defs": { + "cave0": "#171411", + "cave1": "#211b16", + "cave2": "#2d241d", + "cave3": "#44372c", + "dirt": "#8b5a2b", + "dirtBright": "#b47a45", + "stone": "#8b8b8b", + "stoneDim": "#6f6f6f", + "parchment": "#f4ead0", + "parchmentPanel": "#e8d9b7", + "parchmentElement": "#d9c391", + "ink": "#2b2118", + "inkMuted": "#6d5a45", + "grass": "#79c05a", + "grassBright": "#91bd59", + "leaf": "#619961", + "diamond": "#55e0dc", + "diamondDeep": "#1f8f93", + "lapis": "#4f7fff", + "lapisDeep": "#315ab8", + "gold": "#ffd15c", + "goldDeep": "#b17b16", + "redstone": "#ff3200", + "redstoneDeep": "#b70000", + "amethyst": "#b983ff", + "amethystDeep": "#7f52bf", + "snow": "#f4f7ef" + }, + "theme": { + "primary": { "dark": "grassBright", "light": "leaf" }, + "secondary": { "dark": "diamond", "light": "diamondDeep" }, + "accent": { "dark": "gold", "light": "goldDeep" }, + "error": { "dark": "redstone", "light": "redstoneDeep" }, + "warning": { "dark": "gold", "light": "goldDeep" }, + "success": { "dark": "grass", "light": "leaf" }, + "info": { "dark": "diamond", "light": "diamondDeep" }, + "text": { "dark": "snow", "light": "ink" }, + "textMuted": { "dark": "stone", "light": "inkMuted" }, + "background": { "dark": "cave0", "light": "parchment" }, + "backgroundPanel": { "dark": "cave1", "light": "parchmentPanel" }, + "backgroundElement": { "dark": "cave2", "light": "parchmentElement" }, + "backgroundMenu": { "dark": "cave3", "light": "parchmentElement" }, + "border": { "dark": "cave3", "light": "dirtBright" }, + "borderActive": { "dark": "grassBright", "light": "leaf" }, + "borderSubtle": { "dark": "cave2", "light": "parchmentElement" }, + "selectedListItemText": { "dark": "cave0", "light": "parchment" }, + "diffAdded": { "dark": "grass", "light": "leaf" }, + "diffRemoved": { "dark": "redstone", "light": "redstoneDeep" }, + "diffContext": { "dark": "stone", "light": "inkMuted" }, + "diffHunkHeader": { "dark": "diamond", "light": "diamondDeep" }, + "diffHighlightAdded": { "dark": "grassBright", "light": "leaf" }, + "diffHighlightRemoved": { "dark": "#ff6a42", "light": "redstoneDeep" }, + "diffAddedBg": { "dark": "#20301c", "light": "#dce8cf" }, + "diffRemovedBg": { "dark": "#321916", "light": "#f0d4cb" }, + "diffContextBg": { "dark": "cave1", "light": "parchmentPanel" }, + "diffLineNumber": { "dark": "stoneDim", "light": "inkMuted" }, + "diffAddedLineNumberBg": { "dark": "#182516", "light": "#cfdcbf" }, + "diffRemovedLineNumberBg": { "dark": "#281310", "light": "#e5c2b7" }, + "markdownText": { "dark": "snow", "light": "ink" }, + "markdownHeading": { "dark": "gold", "light": "goldDeep" }, + "markdownLink": { "dark": "diamond", "light": "diamondDeep" }, + "markdownLinkText": { "dark": "lapis", "light": "lapisDeep" }, + "markdownCode": { "dark": "grassBright", "light": "leaf" }, + "markdownBlockQuote": { "dark": "dirtBright", "light": "dirt" }, + "markdownEmph": { "dark": "amethyst", "light": "amethystDeep" }, + "markdownStrong": { "dark": "gold", "light": "goldDeep" }, + "markdownHorizontalRule": { "dark": "stoneDim", "light": "inkMuted" }, + "markdownListItem": { "dark": "grassBright", "light": "leaf" }, + "markdownListEnumeration": { "dark": "diamond", "light": "diamondDeep" }, + "markdownImage": { "dark": "lapis", "light": "lapisDeep" }, + "markdownImageText": { "dark": "diamond", "light": "diamondDeep" }, + "markdownCodeBlock": { "dark": "snow", "light": "ink" }, + "syntaxComment": { "dark": "stone", "light": "inkMuted" }, + "syntaxKeyword": { "dark": "amethyst", "light": "amethystDeep" }, + "syntaxFunction": { "dark": "diamond", "light": "diamondDeep" }, + "syntaxVariable": { "dark": "snow", "light": "ink" }, + "syntaxString": { "dark": "grassBright", "light": "leaf" }, + "syntaxNumber": { "dark": "gold", "light": "goldDeep" }, + "syntaxType": { "dark": "lapis", "light": "lapisDeep" }, + "syntaxOperator": { "dark": "dirtBright", "light": "dirt" }, + "syntaxPunctuation": { "dark": "snow", "light": "ink" } + } +} diff --git a/packages/web/src/content/docs/themes.mdx b/packages/web/src/content/docs/themes.mdx index 8a7c6a46ac..0ed9cd990b 100644 --- a/packages/web/src/content/docs/themes.mdx +++ b/packages/web/src/content/docs/themes.mdx @@ -35,6 +35,7 @@ OpenCode comes with several built-in themes. | `catppuccin-macchiato` | Based on the [Catppuccin](https://github.com/catppuccin) theme | | `gruvbox` | Based on the [Gruvbox](https://github.com/morhetz/gruvbox) theme | | `kanagawa` | Based on the [Kanagawa](https://github.com/rebelot/kanagawa.nvim) theme | +| `opencraft` | Blocky cave, grass, diamond, gold, and redstone-inspired palette | | `nord` | Based on the [Nord](https://github.com/nordtheme/nord) theme | | `matrix` | Hacker-style green on black theme | | `one-dark` | Based on the [Atom One](https://github.com/Th3Whit3Wolf/one-nvim) Dark theme |