@@ -149,43 +149,93 @@ Available preset themes:
149149| ` dark ` | Dark theme (optimized for dark backgrounds) |
150150| ` github-light ` | GitHub Light style theme |
151151| ` github-dark ` | GitHub Dark style theme |
152- | ` gitlab-light ` | GitLab Light style theme |
153- | ` gitlab-dark ` | GitLab Dark style theme |
154152| ` monokai ` | Monokai-style theme |
155153| ` dracula ` | Dracula-style theme |
154+ | ` ansi-light ` | ANSI light theme (standard 16 colors) |
155+ | ` ansi-dark ` | ANSI dark theme (standard 16 colors) |
156156
157157** Custom Theme Colors**
158158
159- Use ` preset: "custom" ` with ` overrides ` to customize specific colors:
159+ The recommended way is to use ` colors ` — a simplified palette of 16 base colors. The system automatically derives the full theme :
160160
161161``` json
162162{
163163 "theme" : {
164164 "preset" : " custom" ,
165+ "colors" : {
166+ "Background" : " #ffffff" ,
167+ "Foreground" : " #1F2328" ,
168+ "Gray" : " #8b949e" ,
169+ "LightBlue" : " #0969da" ,
170+ "AccentBlue" : " #ff6600" ,
171+ "AccentPurple" : " #8250df" ,
172+ "AccentCyan" : " #0550ae" ,
173+ "AccentGreen" : " #1a7f37" ,
174+ "AccentYellow" : " #fa8c16" ,
175+ "AccentRed" : " #d1242f" ,
176+ "AccentYellowDim" : " #9a6700" ,
177+ "AccentRedDim" : " #a40e26" ,
178+ "DiffAdded" : " #dafbe1" ,
179+ "DiffRemoved" : " #ffebe9" ,
180+ "Comment" : " #6e7781"
181+ }
182+ }
183+ }
184+ ```
185+
186+ You can also combine ` colors ` with ` overrides ` to fine-tune specific tokens:
187+
188+ ``` json
189+ {
190+ "theme" : {
191+ "preset" : " custom" ,
192+ "colors" : { "Background" : " #1a1a2e" , "Foreground" : " #e0e0e0" , "..." : " ..." },
193+ "overrides" : {
194+ "agent" : { "streaming" : " #ffcc00" }
195+ }
196+ }
197+ }
198+ ```
199+
200+ Advanced: use ` base ` to inherit from another preset, with ` overrides ` to tweak:
201+
202+ ``` json
203+ {
204+ "theme" : {
205+ "preset" : " custom" ,
206+ "base" : " dark" ,
165207 "overrides" : {
166- "primary" : " #ff6600" ,
167- "success" : " greenBright"
208+ "brand" : { "primary" : " #ff6600" }
168209 }
169210 }
170211}
171212```
172213
173- ** Available Color Tokens**
174-
175- | Token | Description | Default Value |
176- | ------------ | ------------------------------------------------ | ------------- |
177- | ` primary ` | Brand color: logo, user messages, selected items, headings | ` #229ac3 ` |
178- | ` secondary ` | Auxiliary brand color: borders, gradients | ` #229ac3e6 ` |
179- | ` success ` | Success: tool execution success, low-risk ops | ` #1a7f37 ` |
180- | ` error ` | Error: tool execution failure, high-risk ops | ` #d1242f ` |
181- | ` warning ` | Warning: in-progress state, mid-risk ops | ` #fa8c16 ` |
182- | ` info ` | Info: skills, image attachments | ` #0969da ` |
183- | ` text ` | Main text color | ` #3D4149 ` |
184- | ` textDim ` | Secondary text: dimmed hints, quote blocks | ` #646A71 ` |
185- | ` textBright ` | Bright text: emphasized hints | ` #1F2329 ` |
186- | ` code ` | Code blocks / inline code | ` #787f8a ` |
187- | ` border ` | Borders | ` #999 ` |
188- | ` gradients ` | Logo gradient color array | ` ["#229ac3", "#8250df"] ` |
214+ ** Available Color Token Groups**
215+
216+ | Group | Description | Tokens |
217+ | ----- | ----------- | ------ |
218+ | ` text ` | Text hierarchy | ` primary ` , ` secondary ` , ` muted ` , ` disabled ` , ` inverse ` |
219+ | ` border ` | Border hierarchy | ` default ` , ` subtle ` , ` active ` , ` focus ` |
220+ | ` surface ` | Surface colors | ` default ` , ` elevated ` , ` muted ` , ` code ` , ` panel ` , ` quote ` , ` selection ` |
221+ | ` brand ` | Brand colors | ` primary ` , ` secondary ` , ` accent ` |
222+ | ` status ` | Status colors | ` success ` , ` warning ` , ` danger ` , ` info ` |
223+ | ` risk ` | Risk levels | ` low ` , ` medium ` , ` high ` , ` critical ` |
224+ | ` typography ` | Typography colors | ` h1 ` -` h6 ` , ` paragraph ` , ` strong ` , ` emphasis ` , ` delete ` |
225+ | ` link ` | Link colors | ` default ` , ` visited ` , ` hover ` |
226+ | ` inlineCode ` | Inline code | ` foreground ` , ` background ` , ` border ` |
227+ | ` codeBlock ` | Code blocks | ` foreground ` , ` background ` , ` border ` , ` title ` , ` lineNumber ` , ` highlight ` |
228+ | ` syntax ` | Syntax highlighting | ` keyword ` , ` string ` , ` function ` , ` variable ` , ` property ` , ` type ` , ` number ` , ` operator ` , ` punctuation ` , ` comment ` , ` regexp ` , ` constant ` |
229+ | ` blockquote ` | Blockquotes | ` foreground ` , ` border ` |
230+ | ` list ` | Lists | ` bullet ` , ` ordered ` , ` marker ` |
231+ | ` task ` | Task lists | ` checked ` , ` unchecked ` |
232+ | ` table ` | Tables | ` border ` , ` headerForeground ` , ` headerBackground ` , ` cellForeground ` |
233+ | ` hr ` | Horizontal rules | ` foreground ` |
234+ | ` admonition ` | Admonitions | ` note ` , ` tip ` , ` warning ` , ` important ` , ` caution ` |
235+ | ` diff ` | Diff | ` added ` , ` removed ` , ` modified ` , ` addedBackground ` , ` removedBackground ` , ` modifiedBackground ` |
236+ | ` agent ` | Agent states | ` thinking ` , ` reasoning ` , ` toolCall ` , ` toolResult ` , ` streaming ` , ` completed ` |
237+ | ` approval ` | Approval | ` allow ` , ` deny ` , ` review ` |
238+ | ` gradients ` | Gradients | ` banner ` , ` logo ` , ` thinking ` (each is a color array) |
189239
190240Color values support the following formats:
191241- Hex format: ` "#ff6600" ` , ` "#ff6600cc" ` (with alpha)
0 commit comments