Skip to content

Commit 142a1ae

Browse files
Apply PR #28042: feat(tui): add opencraft theme
2 parents 8bc4197 + 62e6da7 commit 142a1ae

3 files changed

Lines changed: 89 additions & 0 deletions

File tree

packages/opencode/src/cli/cmd/tui/context/theme.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import gruvbox from "./theme/gruvbox.json" with { type: "json" }
1818
import kanagawa from "./theme/kanagawa.json" with { type: "json" }
1919
import material from "./theme/material.json" with { type: "json" }
2020
import matrix from "./theme/matrix.json" with { type: "json" }
21+
import opencraft from "./theme/opencraft.json" with { type: "json" }
2122
import mercury from "./theme/mercury.json" with { type: "json" }
2223
import monokai from "./theme/monokai.json" with { type: "json" }
2324
import nightowl from "./theme/nightowl.json" with { type: "json" }
@@ -101,6 +102,7 @@ export const DEFAULT_THEMES: Record<string, ThemeJson> = {
101102
kanagawa,
102103
material,
103104
matrix,
105+
opencraft,
104106
mercury,
105107
monokai,
106108
nightowl,
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"$schema": "https://opencode.ai/theme.json",
3+
"defs": {
4+
"cave0": "#171411",
5+
"cave1": "#211b16",
6+
"cave2": "#2d241d",
7+
"cave3": "#44372c",
8+
"dirt": "#8b5a2b",
9+
"dirtBright": "#b47a45",
10+
"stone": "#8b8b8b",
11+
"stoneDim": "#6f6f6f",
12+
"parchment": "#f4ead0",
13+
"parchmentPanel": "#e8d9b7",
14+
"parchmentElement": "#d9c391",
15+
"ink": "#2b2118",
16+
"inkMuted": "#6d5a45",
17+
"grass": "#79c05a",
18+
"grassBright": "#91bd59",
19+
"leaf": "#619961",
20+
"diamond": "#55e0dc",
21+
"diamondDeep": "#1f8f93",
22+
"lapis": "#4f7fff",
23+
"lapisDeep": "#315ab8",
24+
"gold": "#ffd15c",
25+
"goldDeep": "#b17b16",
26+
"redstone": "#ff3200",
27+
"redstoneDeep": "#b70000",
28+
"amethyst": "#b983ff",
29+
"amethystDeep": "#7f52bf",
30+
"snow": "#f4f7ef"
31+
},
32+
"theme": {
33+
"primary": { "dark": "grassBright", "light": "leaf" },
34+
"secondary": { "dark": "diamond", "light": "diamondDeep" },
35+
"accent": { "dark": "gold", "light": "goldDeep" },
36+
"error": { "dark": "redstone", "light": "redstoneDeep" },
37+
"warning": { "dark": "gold", "light": "goldDeep" },
38+
"success": { "dark": "grass", "light": "leaf" },
39+
"info": { "dark": "diamond", "light": "diamondDeep" },
40+
"text": { "dark": "snow", "light": "ink" },
41+
"textMuted": { "dark": "stone", "light": "inkMuted" },
42+
"background": { "dark": "cave0", "light": "parchment" },
43+
"backgroundPanel": { "dark": "cave1", "light": "parchmentPanel" },
44+
"backgroundElement": { "dark": "cave2", "light": "parchmentElement" },
45+
"backgroundMenu": { "dark": "cave3", "light": "parchmentElement" },
46+
"border": { "dark": "cave3", "light": "dirtBright" },
47+
"borderActive": { "dark": "grassBright", "light": "leaf" },
48+
"borderSubtle": { "dark": "cave2", "light": "parchmentElement" },
49+
"selectedListItemText": { "dark": "cave0", "light": "parchment" },
50+
"diffAdded": { "dark": "grass", "light": "leaf" },
51+
"diffRemoved": { "dark": "redstone", "light": "redstoneDeep" },
52+
"diffContext": { "dark": "stone", "light": "inkMuted" },
53+
"diffHunkHeader": { "dark": "diamond", "light": "diamondDeep" },
54+
"diffHighlightAdded": { "dark": "grassBright", "light": "leaf" },
55+
"diffHighlightRemoved": { "dark": "#ff6a42", "light": "redstoneDeep" },
56+
"diffAddedBg": { "dark": "#20301c", "light": "#dce8cf" },
57+
"diffRemovedBg": { "dark": "#321916", "light": "#f0d4cb" },
58+
"diffContextBg": { "dark": "cave1", "light": "parchmentPanel" },
59+
"diffLineNumber": { "dark": "stoneDim", "light": "inkMuted" },
60+
"diffAddedLineNumberBg": { "dark": "#182516", "light": "#cfdcbf" },
61+
"diffRemovedLineNumberBg": { "dark": "#281310", "light": "#e5c2b7" },
62+
"markdownText": { "dark": "snow", "light": "ink" },
63+
"markdownHeading": { "dark": "gold", "light": "goldDeep" },
64+
"markdownLink": { "dark": "diamond", "light": "diamondDeep" },
65+
"markdownLinkText": { "dark": "lapis", "light": "lapisDeep" },
66+
"markdownCode": { "dark": "grassBright", "light": "leaf" },
67+
"markdownBlockQuote": { "dark": "dirtBright", "light": "dirt" },
68+
"markdownEmph": { "dark": "amethyst", "light": "amethystDeep" },
69+
"markdownStrong": { "dark": "gold", "light": "goldDeep" },
70+
"markdownHorizontalRule": { "dark": "stoneDim", "light": "inkMuted" },
71+
"markdownListItem": { "dark": "grassBright", "light": "leaf" },
72+
"markdownListEnumeration": { "dark": "diamond", "light": "diamondDeep" },
73+
"markdownImage": { "dark": "lapis", "light": "lapisDeep" },
74+
"markdownImageText": { "dark": "diamond", "light": "diamondDeep" },
75+
"markdownCodeBlock": { "dark": "snow", "light": "ink" },
76+
"syntaxComment": { "dark": "stone", "light": "inkMuted" },
77+
"syntaxKeyword": { "dark": "amethyst", "light": "amethystDeep" },
78+
"syntaxFunction": { "dark": "diamond", "light": "diamondDeep" },
79+
"syntaxVariable": { "dark": "snow", "light": "ink" },
80+
"syntaxString": { "dark": "grassBright", "light": "leaf" },
81+
"syntaxNumber": { "dark": "gold", "light": "goldDeep" },
82+
"syntaxType": { "dark": "lapis", "light": "lapisDeep" },
83+
"syntaxOperator": { "dark": "dirtBright", "light": "dirt" },
84+
"syntaxPunctuation": { "dark": "snow", "light": "ink" }
85+
}
86+
}

packages/web/src/content/docs/themes.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ OpenCode comes with several built-in themes.
3535
| `catppuccin-macchiato` | Based on the [Catppuccin](https://github.com/catppuccin) theme |
3636
| `gruvbox` | Based on the [Gruvbox](https://github.com/morhetz/gruvbox) theme |
3737
| `kanagawa` | Based on the [Kanagawa](https://github.com/rebelot/kanagawa.nvim) theme |
38+
| `opencraft` | Blocky cave, grass, diamond, gold, and redstone-inspired palette |
3839
| `nord` | Based on the [Nord](https://github.com/nordtheme/nord) theme |
3940
| `matrix` | Hacker-style green on black theme |
4041
| `one-dark` | Based on the [Atom One](https://github.com/Th3Whit3Wolf/one-nvim) Dark theme |

0 commit comments

Comments
 (0)