Skip to content

Commit 70afbac

Browse files
authored
docs(www): add core CLI theme concepts (#48426)
1 parent 1c723c5 commit 70afbac

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
11
---
22
title: "Theme"
33
---
4+
5+
OpenCode includes built-in light and dark themes. Choose a color scheme in settings, or use colors derived from your terminal.
6+
7+
## Choose a theme
8+
9+
Press `Ctrl+P`, then select **Open settings** to change the theme and color mode.
10+
11+
You can also set them in your global [CLI config](/cli/config):
12+
13+
```json title="~/.config/opencode/cli.json"
14+
{
15+
"$schema": "https://opencode.ai/v2/cli.json",
16+
"theme": {
17+
"name": "tokyonight",
18+
"mode": "system"
19+
}
20+
}
21+
```
22+
23+
## Color mode
24+
25+
Choose whether OpenCode follows your terminal's appearance or always uses light or dark colors:
26+
27+
| Mode | Behavior |
28+
| --- | --- |
29+
| `system` | Follow the terminal's detected light or dark appearance. |
30+
| `dark` | Always use the theme's dark colors. |
31+
| `light` | Always use the theme's light colors. |
32+
33+
For example, always use dark colors:
34+
35+
```json title="cli.json"
36+
{
37+
"theme": {
38+
"name": "tokyonight",
39+
"mode": "dark"
40+
}
41+
}
42+
```
43+
44+
## Terminal colors
45+
46+
When OpenCode can read your terminal palette, the theme picker also includes `system`. This theme derives its colors from your terminal's foreground, background, and ANSI palette.
47+
48+
```json title="cli.json"
49+
{
50+
"theme": {
51+
"name": "system",
52+
"mode": "system"
53+
}
54+
}
55+
```
56+
57+
The theme name `system` selects terminal-derived colors. The color mode `system` follows the terminal's light or dark appearance.

0 commit comments

Comments
 (0)