Skip to main content

j_cli/command/chat/
theme.rs

1use ratatui::style::Color;
2use serde::{Deserialize, Serialize};
3
4/// 主题名称枚举
5#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
6pub enum ThemeName {
7    #[serde(rename = "dark")]
8    Dark,
9    #[serde(rename = "light")]
10    Light,
11    #[serde(rename = "midnight")]
12    Midnight,
13}
14
15impl Default for ThemeName {
16    fn default() -> Self {
17        ThemeName::Midnight
18    }
19}
20
21#[allow(dead_code)]
22impl ThemeName {
23    /// 获取所有主题名称列表(用于配置界面循环切换)
24    pub fn all() -> &'static [ThemeName] {
25        &[ThemeName::Dark, ThemeName::Light, ThemeName::Midnight]
26    }
27
28    /// 切换到下一个主题
29    pub fn next(&self) -> ThemeName {
30        match self {
31            ThemeName::Dark => ThemeName::Light,
32            ThemeName::Light => ThemeName::Midnight,
33            ThemeName::Midnight => ThemeName::Dark,
34        }
35    }
36
37    /// 显示名称
38    pub fn display_name(&self) -> &'static str {
39        match self {
40            ThemeName::Dark => "Dark",
41            ThemeName::Light => "Light",
42            ThemeName::Midnight => "Midnight(默认)",
43        }
44    }
45
46    /// 从字符串解析
47    pub fn from_str(s: &str) -> ThemeName {
48        match s.to_lowercase().as_str() {
49            "dark" => ThemeName::Dark,
50            "light" => ThemeName::Light,
51            "midnight" => ThemeName::Midnight,
52            _ => ThemeName::default(),
53        }
54    }
55
56    /// 转为字符串
57    pub fn to_str(&self) -> &'static str {
58        match self {
59            ThemeName::Dark => "dark",
60            ThemeName::Light => "light",
61            ThemeName::Midnight => "midnight",
62        }
63    }
64}
65
66/// 主题配色方案
67/// 将所有 UI 颜色归类为语义化字段,方便统一管理
68#[derive(Debug, Clone)]
69#[allow(dead_code)]
70pub struct Theme {
71    // ===== 全局背景 =====
72    /// 主背景色
73    pub bg_primary: Color,
74    /// 标题栏背景
75    pub bg_title: Color,
76    /// 输入区背景
77    pub bg_input: Color,
78    /// 帮助/配置界面背景
79    pub bg_panel: Color,
80
81    // ===== 边框 =====
82    /// 标题栏边框
83    pub border_title: Color,
84    /// 消息区边框
85    pub border_message: Color,
86    /// 输入区边框(正常)
87    pub border_input: Color,
88    /// 输入区边框(加载中)
89    pub border_input_loading: Color,
90    /// 配置界面边框
91    pub border_config: Color,
92    /// 分隔线
93    pub separator: Color,
94
95    // ===== 气泡 =====
96    /// AI 气泡背景
97    pub bubble_ai: Color,
98    /// AI 气泡背景(选中时)
99    pub bubble_ai_selected: Color,
100    /// 用户气泡背景
101    pub bubble_user: Color,
102    /// 用户气泡背景(选中时)
103    pub bubble_user_selected: Color,
104
105    // ===== 标签 =====
106    /// AI 标签颜色
107    pub label_ai: Color,
108    /// 用户标签颜色
109    pub label_user: Color,
110    /// 选中标签颜色
111    pub label_selected: Color,
112
113    // ===== 文字 =====
114    /// 正文颜色
115    pub text_normal: Color,
116    /// 强调色(加粗文本)
117    pub text_bold: Color,
118    /// 弱化文字
119    pub text_dim: Color,
120    /// 非常弱化的文字
121    pub text_very_dim: Color,
122    /// 白色文字(用于输入区等)
123    pub text_white: Color,
124    /// 系统消息颜色
125    pub text_system: Color,
126
127    // ===== 标题栏元素 =====
128    /// 标题栏图标色
129    pub title_icon: Color,
130    /// 标题栏分隔符
131    pub title_separator: Color,
132    /// 模型名称颜色
133    pub title_model: Color,
134    /// 消息计数颜色
135    pub title_count: Color,
136    /// 加载中文字颜色
137    pub title_loading: Color,
138
139    // ===== 输入区 =====
140    /// 输入提示符颜色
141    pub input_prompt: Color,
142    /// 输入提示符(加载中)颜色
143    pub input_prompt_loading: Color,
144    /// 光标前景
145    pub cursor_fg: Color,
146    /// 光标背景
147    pub cursor_bg: Color,
148
149    // ===== 提示栏 =====
150    /// 键位标签前景
151    pub hint_key_fg: Color,
152    /// 键位标签背景
153    pub hint_key_bg: Color,
154    /// 键位描述文字
155    pub hint_desc: Color,
156    /// 提示栏分隔符
157    pub hint_separator: Color,
158
159    // ===== Toast =====
160    /// 成功 Toast 边框
161    pub toast_success_border: Color,
162    /// 成功 Toast 背景
163    pub toast_success_bg: Color,
164    /// 成功 Toast 文字
165    pub toast_success_text: Color,
166    /// 错误 Toast 边框
167    pub toast_error_border: Color,
168    /// 错误 Toast 背景
169    pub toast_error_bg: Color,
170    /// 错误 Toast 文字
171    pub toast_error_text: Color,
172
173    // ===== 欢迎界面 =====
174    /// 欢迎框边框
175    pub welcome_border: Color,
176    /// 欢迎文字
177    pub welcome_text: Color,
178    /// 欢迎提示文字
179    pub welcome_hint: Color,
180
181    // ===== 模型选择 =====
182    /// 模型选择框边框
183    pub model_sel_border: Color,
184    /// 模型选择框标题
185    pub model_sel_title: Color,
186    /// 活跃模型颜色
187    pub model_sel_active: Color,
188    /// 非活跃模型颜色
189    pub model_sel_inactive: Color,
190    /// 选中高亮背景
191    pub model_sel_highlight_bg: Color,
192
193    // ===== 配置界面 =====
194    /// 配置标题颜色
195    pub config_title: Color,
196    /// 配置分类标题颜色
197    pub config_section: Color,
198    /// 配置选中指针颜色
199    pub config_pointer: Color,
200    /// 配置选中标签颜色
201    pub config_label_selected: Color,
202    /// 配置普通标签颜色
203    pub config_label: Color,
204    /// 配置值颜色
205    pub config_value: Color,
206    /// 配置编辑背景
207    pub config_edit_bg: Color,
208    /// 配置 tab 选中背景
209    pub config_tab_active_bg: Color,
210    /// 配置 tab 选中前景
211    pub config_tab_active_fg: Color,
212    /// 配置 tab 非选中颜色
213    pub config_tab_inactive: Color,
214    /// 配置键位说明颜色
215    pub config_hint_key: Color,
216    /// 配置描述颜色
217    pub config_hint_desc: Color,
218    /// 配置 toggle 开启颜色
219    pub config_toggle_on: Color,
220    /// 配置 toggle 关闭颜色
221    pub config_toggle_off: Color,
222    /// 配置弱化文字
223    pub config_dim: Color,
224    /// API Key 隐藏颜色
225    pub config_api_key: Color,
226
227    // ===== Markdown 渲染 =====
228    /// 标题 h1 颜色
229    pub md_h1: Color,
230    /// 标题 h2 颜色
231    pub md_h2: Color,
232    /// 标题 h3 颜色
233    pub md_h3: Color,
234    /// 标题 h4+ 颜色
235    pub md_h4: Color,
236    /// 标题分隔线
237    pub md_heading_sep: Color,
238    /// 行内代码前景
239    pub md_inline_code_fg: Color,
240    /// 行内代码背景
241    pub md_inline_code_bg: Color,
242    /// 列表符号颜色
243    pub md_list_bullet: Color,
244    /// 引用块竖线颜色
245    pub md_blockquote_bar: Color,
246    /// 引用块文字颜色
247    pub md_blockquote_text: Color,
248    /// 分隔线颜色
249    pub md_rule: Color,
250
251    // ===== 代码块 =====
252    /// 代码块边框颜色
253    pub code_border: Color,
254    /// 代码块背景
255    pub code_bg: Color,
256    /// 代码默认文字颜色
257    pub code_default: Color,
258    /// 关键字颜色
259    pub code_keyword: Color,
260    /// 字符串颜色
261    pub code_string: Color,
262    /// 注释颜色
263    pub code_comment: Color,
264    /// 数字颜色
265    pub code_number: Color,
266    /// 类型名颜色
267    pub code_type: Color,
268    /// 原始类型颜色
269    pub code_primitive: Color,
270    /// 宏调用颜色
271    pub code_macro: Color,
272    /// 属性/装饰器颜色
273    pub code_attribute: Color,
274    /// 生命周期颜色
275    pub code_lifetime: Color,
276    /// Shell 变量颜色
277    pub code_shell_var: Color,
278
279    // ===== 表格 =====
280    /// 表格边框颜色
281    pub table_border: Color,
282    /// 表格表头颜色
283    pub table_header: Color,
284    /// 表格内容颜色
285    pub table_body: Color,
286
287    // ===== 帮助界面 =====
288    /// 帮助标题颜色
289    pub help_title: Color,
290    /// 帮助按键颜色
291    pub help_key: Color,
292    /// 帮助描述颜色
293    pub help_desc: Color,
294    /// 帮助文件路径颜色
295    pub help_path: Color,
296    /// 帮助背景颜色
297    pub help_bg: Color,
298}
299
300impl Theme {
301    /// 根据主题名称创建对应的主题
302    pub fn from_name(name: &ThemeName) -> Self {
303        match name {
304            ThemeName::Dark => Self::dark(),
305            ThemeName::Light => Self::light(),
306            ThemeName::Midnight => Self::midnight(),
307        }
308    }
309
310    /// Midnight 主题(原始深色主题 - 默认)
311    pub fn midnight() -> Self {
312        Self {
313            // 全局背景
314            bg_primary: Color::Rgb(22, 22, 30),
315            bg_title: Color::Rgb(28, 28, 40),
316            bg_input: Color::Rgb(26, 26, 38),
317            bg_panel: Color::Rgb(24, 24, 34),
318
319            // 边框
320            border_title: Color::Rgb(80, 100, 140),
321            border_message: Color::Rgb(50, 55, 70),
322            border_input: Color::Rgb(60, 100, 80),
323            border_input_loading: Color::Rgb(120, 100, 50),
324            border_config: Color::Rgb(80, 80, 110),
325            separator: Color::Rgb(50, 55, 70),
326
327            // 气泡
328            bubble_ai: Color::Rgb(38, 38, 52),
329            bubble_ai_selected: Color::Rgb(48, 48, 68),
330            bubble_user: Color::Rgb(40, 70, 120),
331            bubble_user_selected: Color::Rgb(55, 85, 140),
332
333            // 标签
334            label_ai: Color::Rgb(120, 220, 160),
335            label_user: Color::Rgb(100, 160, 255),
336            label_selected: Color::Rgb(255, 200, 80),
337
338            // 文字
339            text_normal: Color::Rgb(220, 220, 230),
340            text_bold: Color::Rgb(240, 210, 170),
341            text_dim: Color::Rgb(140, 140, 170),
342            text_very_dim: Color::Rgb(80, 80, 100),
343            text_white: Color::White,
344            text_system: Color::Rgb(100, 100, 120),
345
346            // 标题栏
347            title_icon: Color::Rgb(120, 180, 255),
348            title_separator: Color::Rgb(60, 60, 80),
349            title_model: Color::Rgb(160, 220, 160),
350            title_count: Color::Rgb(180, 180, 200),
351            title_loading: Color::Rgb(255, 200, 80),
352
353            // 输入区
354            input_prompt: Color::Rgb(100, 200, 130),
355            input_prompt_loading: Color::Rgb(255, 200, 80),
356            cursor_fg: Color::Rgb(22, 22, 30),
357            cursor_bg: Color::Rgb(200, 210, 240),
358
359            // 提示栏
360            hint_key_fg: Color::Rgb(22, 22, 30),
361            hint_key_bg: Color::Rgb(100, 110, 140),
362            hint_desc: Color::Rgb(120, 120, 150),
363            hint_separator: Color::Rgb(50, 50, 65),
364
365            // Toast
366            toast_success_border: Color::Rgb(60, 160, 80),
367            toast_success_bg: Color::Rgb(18, 40, 25),
368            toast_success_text: Color::Rgb(140, 230, 160),
369            toast_error_border: Color::Rgb(200, 70, 70),
370            toast_error_bg: Color::Rgb(50, 18, 18),
371            toast_error_text: Color::Rgb(255, 130, 130),
372
373            // 欢迎界面
374            welcome_border: Color::Rgb(60, 70, 90),
375            welcome_text: Color::Rgb(120, 140, 180),
376            welcome_hint: Color::Rgb(80, 90, 110),
377
378            // 模型选择
379            model_sel_border: Color::Rgb(180, 160, 80),
380            model_sel_title: Color::Rgb(230, 210, 120),
381            model_sel_active: Color::Rgb(120, 220, 160),
382            model_sel_inactive: Color::Rgb(180, 180, 200),
383            model_sel_highlight_bg: Color::Rgb(50, 55, 80),
384
385            // 配置界面
386            config_title: Color::Rgb(120, 180, 255),
387            config_section: Color::Rgb(160, 220, 160),
388            config_pointer: Color::Rgb(255, 200, 80),
389            config_label_selected: Color::Rgb(230, 210, 120),
390            config_label: Color::Rgb(140, 140, 160),
391            config_value: Color::Rgb(180, 180, 200),
392            config_edit_bg: Color::Rgb(50, 55, 80),
393            config_tab_active_bg: Color::Rgb(120, 180, 255),
394            config_tab_active_fg: Color::Rgb(22, 22, 30),
395            config_tab_inactive: Color::Rgb(150, 150, 170),
396            config_hint_key: Color::Rgb(230, 210, 120),
397            config_hint_desc: Color::Rgb(120, 120, 150),
398            config_toggle_on: Color::Rgb(120, 220, 160),
399            config_toggle_off: Color::Rgb(200, 100, 100),
400            config_dim: Color::Rgb(80, 80, 100),
401            config_api_key: Color::Rgb(100, 100, 120),
402
403            // Markdown
404            md_h1: Color::Rgb(100, 180, 255),
405            md_h2: Color::Rgb(130, 190, 255),
406            md_h3: Color::Rgb(160, 200, 255),
407            md_h4: Color::Rgb(180, 210, 255),
408            md_heading_sep: Color::Rgb(60, 70, 100),
409            md_inline_code_fg: Color::Rgb(230, 190, 120),
410            md_inline_code_bg: Color::Rgb(45, 45, 60),
411            md_list_bullet: Color::Rgb(100, 160, 255),
412            md_blockquote_bar: Color::Rgb(80, 100, 140),
413            md_blockquote_text: Color::Rgb(150, 160, 180),
414            md_rule: Color::Rgb(70, 75, 90),
415
416            // 代码块
417            code_border: Color::Rgb(80, 90, 110),
418            code_bg: Color::Rgb(30, 30, 42),
419            code_default: Color::Rgb(171, 178, 191),
420            code_keyword: Color::Rgb(198, 120, 221),
421            code_string: Color::Rgb(152, 195, 121),
422            code_comment: Color::Rgb(92, 99, 112),
423            code_number: Color::Rgb(209, 154, 102),
424            code_type: Color::Rgb(229, 192, 123),
425            code_primitive: Color::Rgb(86, 182, 194),
426            code_macro: Color::Rgb(97, 175, 239),
427            code_attribute: Color::Rgb(86, 182, 194),
428            code_lifetime: Color::Rgb(229, 192, 123),
429            code_shell_var: Color::Rgb(86, 182, 194),
430
431            // 表格
432            table_border: Color::Rgb(60, 70, 100),
433            table_header: Color::Rgb(120, 180, 255),
434            table_body: Color::Rgb(180, 180, 200),
435
436            // 帮助界面
437            help_title: Color::Rgb(120, 180, 255),
438            help_key: Color::Rgb(230, 210, 120),
439            help_desc: Color::Rgb(200, 200, 220),
440            help_path: Color::Rgb(100, 100, 130),
441            help_bg: Color::Rgb(24, 24, 34),
442        }
443    }
444
445    /// Dark 主题(偏灰暗的深色主题,类似 VS Code Dark+)
446    pub fn dark() -> Self {
447        Self {
448            // 全局背景
449            bg_primary: Color::Rgb(30, 30, 30),
450            bg_title: Color::Rgb(37, 37, 38),
451            bg_input: Color::Rgb(37, 37, 38),
452            bg_panel: Color::Rgb(37, 37, 38),
453
454            // 边框
455            border_title: Color::Rgb(70, 70, 70),
456            border_message: Color::Rgb(55, 55, 55),
457            border_input: Color::Rgb(55, 80, 55),
458            border_input_loading: Color::Rgb(120, 100, 50),
459            border_config: Color::Rgb(70, 70, 70),
460            separator: Color::Rgb(55, 55, 55),
461
462            // 气泡
463            bubble_ai: Color::Rgb(40, 40, 40),
464            bubble_ai_selected: Color::Rgb(50, 50, 55),
465            bubble_user: Color::Rgb(38, 65, 110),
466            bubble_user_selected: Color::Rgb(50, 80, 130),
467
468            // 标签
469            label_ai: Color::Rgb(80, 200, 120),
470            label_user: Color::Rgb(80, 150, 240),
471            label_selected: Color::Rgb(255, 200, 80),
472
473            // 文字
474            text_normal: Color::Rgb(212, 212, 212),
475            text_bold: Color::Rgb(230, 200, 160),
476            text_dim: Color::Rgb(128, 128, 128),
477            text_very_dim: Color::Rgb(80, 80, 80),
478            text_white: Color::White,
479            text_system: Color::Rgb(100, 100, 100),
480
481            // 标题栏
482            title_icon: Color::Rgb(100, 160, 240),
483            title_separator: Color::Rgb(60, 60, 60),
484            title_model: Color::Rgb(140, 200, 140),
485            title_count: Color::Rgb(170, 170, 170),
486            title_loading: Color::Rgb(255, 200, 80),
487
488            // 输入区
489            input_prompt: Color::Rgb(80, 180, 100),
490            input_prompt_loading: Color::Rgb(255, 200, 80),
491            cursor_fg: Color::Rgb(30, 30, 30),
492            cursor_bg: Color::Rgb(200, 200, 200),
493
494            // 提示栏
495            hint_key_fg: Color::Rgb(30, 30, 30),
496            hint_key_bg: Color::Rgb(100, 100, 100),
497            hint_desc: Color::Rgb(128, 128, 128),
498            hint_separator: Color::Rgb(50, 50, 50),
499
500            // Toast
501            toast_success_border: Color::Rgb(60, 160, 80),
502            toast_success_bg: Color::Rgb(20, 40, 25),
503            toast_success_text: Color::Rgb(140, 230, 160),
504            toast_error_border: Color::Rgb(200, 70, 70),
505            toast_error_bg: Color::Rgb(50, 20, 20),
506            toast_error_text: Color::Rgb(255, 130, 130),
507
508            // 欢迎界面
509            welcome_border: Color::Rgb(60, 60, 60),
510            welcome_text: Color::Rgb(120, 140, 180),
511            welcome_hint: Color::Rgb(80, 80, 80),
512
513            // 模型选择
514            model_sel_border: Color::Rgb(180, 160, 80),
515            model_sel_title: Color::Rgb(230, 210, 120),
516            model_sel_active: Color::Rgb(80, 200, 120),
517            model_sel_inactive: Color::Rgb(170, 170, 170),
518            model_sel_highlight_bg: Color::Rgb(50, 50, 60),
519
520            // 配置界面
521            config_title: Color::Rgb(100, 160, 240),
522            config_section: Color::Rgb(140, 200, 140),
523            config_pointer: Color::Rgb(255, 200, 80),
524            config_label_selected: Color::Rgb(230, 210, 120),
525            config_label: Color::Rgb(128, 128, 128),
526            config_value: Color::Rgb(170, 170, 170),
527            config_edit_bg: Color::Rgb(50, 50, 60),
528            config_tab_active_bg: Color::Rgb(100, 160, 240),
529            config_tab_active_fg: Color::Rgb(30, 30, 30),
530            config_tab_inactive: Color::Rgb(140, 140, 140),
531            config_hint_key: Color::Rgb(230, 210, 120),
532            config_hint_desc: Color::Rgb(128, 128, 128),
533            config_toggle_on: Color::Rgb(80, 200, 120),
534            config_toggle_off: Color::Rgb(200, 100, 100),
535            config_dim: Color::Rgb(80, 80, 80),
536            config_api_key: Color::Rgb(100, 100, 100),
537
538            // Markdown
539            md_h1: Color::Rgb(80, 160, 240),
540            md_h2: Color::Rgb(100, 170, 240),
541            md_h3: Color::Rgb(120, 180, 240),
542            md_h4: Color::Rgb(140, 190, 240),
543            md_heading_sep: Color::Rgb(60, 60, 80),
544            md_inline_code_fg: Color::Rgb(220, 180, 110),
545            md_inline_code_bg: Color::Rgb(50, 50, 60),
546            md_list_bullet: Color::Rgb(80, 150, 240),
547            md_blockquote_bar: Color::Rgb(70, 90, 130),
548            md_blockquote_text: Color::Rgb(150, 150, 170),
549            md_rule: Color::Rgb(70, 70, 80),
550
551            // 代码块
552            code_border: Color::Rgb(70, 70, 80),
553            code_bg: Color::Rgb(35, 35, 38),
554            code_default: Color::Rgb(212, 212, 212),
555            code_keyword: Color::Rgb(198, 120, 221),
556            code_string: Color::Rgb(152, 195, 121),
557            code_comment: Color::Rgb(106, 115, 125),
558            code_number: Color::Rgb(209, 154, 102),
559            code_type: Color::Rgb(229, 192, 123),
560            code_primitive: Color::Rgb(86, 182, 194),
561            code_macro: Color::Rgb(97, 175, 239),
562            code_attribute: Color::Rgb(86, 182, 194),
563            code_lifetime: Color::Rgb(229, 192, 123),
564            code_shell_var: Color::Rgb(86, 182, 194),
565
566            // 表格
567            table_border: Color::Rgb(60, 60, 80),
568            table_header: Color::Rgb(80, 160, 240),
569            table_body: Color::Rgb(170, 170, 170),
570
571            // 帮助界面
572            help_title: Color::Rgb(100, 160, 240),
573            help_key: Color::Rgb(230, 210, 120),
574            help_desc: Color::Rgb(200, 200, 200),
575            help_path: Color::Rgb(100, 100, 100),
576            help_bg: Color::Rgb(37, 37, 38),
577        }
578    }
579
580    /// Light 主题(浅色主题,类似 VS Code Light+)
581    pub fn light() -> Self {
582        Self {
583            // 全局背景
584            bg_primary: Color::Rgb(255, 255, 255),
585            bg_title: Color::Rgb(243, 243, 243),
586            bg_input: Color::Rgb(248, 248, 248),
587            bg_panel: Color::Rgb(248, 248, 248),
588
589            // 边框
590            border_title: Color::Rgb(190, 190, 200),
591            border_message: Color::Rgb(210, 210, 220),
592            border_input: Color::Rgb(160, 200, 160),
593            border_input_loading: Color::Rgb(180, 150, 50),
594            border_config: Color::Rgb(190, 190, 200),
595            separator: Color::Rgb(210, 210, 220),
596
597            // 气泡
598            bubble_ai: Color::Rgb(240, 240, 245),
599            bubble_ai_selected: Color::Rgb(225, 230, 240),
600            bubble_user: Color::Rgb(210, 230, 255),
601            bubble_user_selected: Color::Rgb(190, 215, 250),
602
603            // 标签
604            label_ai: Color::Rgb(40, 140, 80),
605            label_user: Color::Rgb(30, 100, 200),
606            label_selected: Color::Rgb(180, 130, 20),
607
608            // 文字
609            text_normal: Color::Rgb(40, 40, 50),
610            text_bold: Color::Rgb(150, 90, 30),
611            text_dim: Color::Rgb(120, 120, 140),
612            text_very_dim: Color::Rgb(170, 170, 180),
613            text_white: Color::Rgb(40, 40, 50),
614            text_system: Color::Rgb(140, 140, 160),
615
616            // 标题栏
617            title_icon: Color::Rgb(40, 100, 200),
618            title_separator: Color::Rgb(200, 200, 210),
619            title_model: Color::Rgb(40, 140, 80),
620            title_count: Color::Rgb(100, 100, 120),
621            title_loading: Color::Rgb(180, 130, 20),
622
623            // 输入区
624            input_prompt: Color::Rgb(40, 140, 80),
625            input_prompt_loading: Color::Rgb(180, 130, 20),
626            cursor_fg: Color::Rgb(255, 255, 255),
627            cursor_bg: Color::Rgb(50, 100, 200),
628
629            // 提示栏
630            hint_key_fg: Color::Rgb(255, 255, 255),
631            hint_key_bg: Color::Rgb(100, 110, 130),
632            hint_desc: Color::Rgb(120, 120, 140),
633            hint_separator: Color::Rgb(210, 210, 220),
634
635            // Toast
636            toast_success_border: Color::Rgb(60, 160, 80),
637            toast_success_bg: Color::Rgb(230, 250, 235),
638            toast_success_text: Color::Rgb(30, 100, 50),
639            toast_error_border: Color::Rgb(200, 70, 70),
640            toast_error_bg: Color::Rgb(255, 235, 235),
641            toast_error_text: Color::Rgb(160, 30, 30),
642
643            // 欢迎界面
644            welcome_border: Color::Rgb(180, 190, 210),
645            welcome_text: Color::Rgb(60, 80, 130),
646            welcome_hint: Color::Rgb(140, 150, 170),
647
648            // 模型选择
649            model_sel_border: Color::Rgb(180, 160, 80),
650            model_sel_title: Color::Rgb(140, 110, 30),
651            model_sel_active: Color::Rgb(40, 140, 80),
652            model_sel_inactive: Color::Rgb(100, 100, 120),
653            model_sel_highlight_bg: Color::Rgb(225, 230, 245),
654
655            // 配置界面
656            config_title: Color::Rgb(40, 100, 200),
657            config_section: Color::Rgb(40, 140, 80),
658            config_pointer: Color::Rgb(180, 130, 20),
659            config_label_selected: Color::Rgb(140, 110, 30),
660            config_label: Color::Rgb(120, 120, 140),
661            config_value: Color::Rgb(60, 60, 80),
662            config_edit_bg: Color::Rgb(225, 230, 245),
663            config_tab_active_bg: Color::Rgb(40, 100, 200),
664            config_tab_active_fg: Color::Rgb(255, 255, 255),
665            config_tab_inactive: Color::Rgb(120, 120, 140),
666            config_hint_key: Color::Rgb(140, 110, 30),
667            config_hint_desc: Color::Rgb(120, 120, 140),
668            config_toggle_on: Color::Rgb(40, 140, 80),
669            config_toggle_off: Color::Rgb(200, 80, 80),
670            config_dim: Color::Rgb(170, 170, 180),
671            config_api_key: Color::Rgb(160, 160, 170),
672
673            // Markdown
674            md_h1: Color::Rgb(30, 80, 180),
675            md_h2: Color::Rgb(40, 100, 200),
676            md_h3: Color::Rgb(50, 110, 210),
677            md_h4: Color::Rgb(60, 120, 220),
678            md_heading_sep: Color::Rgb(180, 190, 210),
679            md_inline_code_fg: Color::Rgb(160, 80, 30),
680            md_inline_code_bg: Color::Rgb(240, 235, 225),
681            md_list_bullet: Color::Rgb(30, 100, 200),
682            md_blockquote_bar: Color::Rgb(100, 130, 180),
683            md_blockquote_text: Color::Rgb(80, 90, 110),
684            md_rule: Color::Rgb(190, 195, 210),
685
686            // 代码块(VS Code Light+ 风格)
687            code_border: Color::Rgb(190, 195, 210),
688            code_bg: Color::Rgb(245, 245, 248),
689            code_default: Color::Rgb(40, 40, 50),
690            code_keyword: Color::Rgb(175, 0, 219),
691            code_string: Color::Rgb(163, 21, 21),
692            code_comment: Color::Rgb(0, 128, 0),
693            code_number: Color::Rgb(9, 134, 88),
694            code_type: Color::Rgb(38, 127, 153),
695            code_primitive: Color::Rgb(0, 112, 193),
696            code_macro: Color::Rgb(121, 94, 38),
697            code_attribute: Color::Rgb(0, 112, 193),
698            code_lifetime: Color::Rgb(38, 127, 153),
699            code_shell_var: Color::Rgb(0, 112, 193),
700
701            // 表格
702            table_border: Color::Rgb(180, 190, 210),
703            table_header: Color::Rgb(30, 80, 180),
704            table_body: Color::Rgb(60, 60, 80),
705
706            // 帮助界面
707            help_title: Color::Rgb(40, 100, 200),
708            help_key: Color::Rgb(140, 110, 30),
709            help_desc: Color::Rgb(50, 50, 60),
710            help_path: Color::Rgb(120, 120, 140),
711            help_bg: Color::Rgb(248, 248, 248),
712        }
713    }
714}