Hifox 帮助文档
首页下载
首页下载
  1. 高级
  • Hifox 是什么?
  • 快速开始
  • 连接 AI 模型
  • 数据源
  • 技能(Skills)
  • 会话状态
  • 分享会话
  • 自动化任务
  • 安全与隐私
  • 常见问题(FAQ)
  • 高级
    • 标签(Labels)
    • 工作区(Workspaces)
    • 主题(Themes)
    • 应用设置(App Settings)
    • 个人偏好(Preferences)
  1. 高级

主题(Themes)

Hifox 提供灵活的主题系统,支持颜色自定义、深色/浅色模式,以及预设主题安装。

颜色系统#

主题基于 6 个语义颜色变量:
变量说明默认用途
background主背景色页面背景
foreground主前景色文字颜色
accent强调色品牌紫色,执行模式高亮
info信息色琥珀色,确认模式、警告
success成功色绿色
destructive危险色红色,删除操作
此外还有 5 个表面颜色,控制特定 UI 区域:
变量区域
paperAI 消息气泡、卡片等浮出内容
navigator左侧边栏背景
input输入框背景
popover下拉菜单、弹窗、右键菜单
popoverSolid风景模式下的不透明弹窗背景

颜色格式#

支持任意 CSS 颜色格式:
{
  "background": "oklch(0.98 0.003 265)",
  "accent": "#8b5cf6",
  "info": "hsl(42, 80%, 55%)",
  "success": "rgb(74, 182, 107)"
}
推荐使用 OKLCH 格式,在深色/浅色模式下视觉一致性最好。

深色模式#

在 dark 字段中提供深色模式覆盖值:
{
  "background": "oklch(0.98 0.003 265)",
  "foreground": "oklch(0.185 0.01 270)",
  "accent": "oklch(0.58 0.22 293)",
  "dark": {
    "background": "oklch(0.234 0.008 297)",
    "foreground": "oklch(0.95 0.01 270)",
    "accent": "oklch(0.750 0.092 39)"
  }
}
只需指定与浅色模式不同的颜色,未指定的颜色会从浅色模式继承。

修改主题#

编辑 ~/.anakin/theme.json 即可覆盖默认颜色:
{
  "accent": "oklch(0.65 0.20 145)",
  "dark": {
    "accent": "oklch(0.75 0.18 145)"
  }
}
只需写入要修改的颜色,其余颜色保持默认值。

预设主题#

预设主题是完整的主题文件,存放在 ~/.anakin/themes/ 目录:
~/.anakin/
├── theme.json          # 应用级覆盖
└── themes/
    ├── dracula.json
    ├── nord.json
    └── my-theme.json
在 设置 → 外观 中选择预设主题,或在 ~/.anakin/config.json 中设置:
{
  "colorTheme": "dracula"
}

预设主题格式#

{
  "name": "Dracula",
  "description": "A dark theme inspired by Dracula",
  "author": "Zeno Rocha",
  "background": "oklch(0.20 0.02 280)",
  "foreground": "oklch(0.96 0.01 275)",
  "accent": "oklch(0.72 0.18 305)",
  "info": "oklch(0.78 0.15 75)",
  "success": "oklch(0.75 0.15 145)",
  "destructive": "oklch(0.68 0.20 15)",
  "shikiTheme": {
    "light": "github-light",
    "dark": "dracula"
  }
}
shikiTheme 控制代码块的语法高亮主题。

风景模式(Scenic Mode)#

风景模式允许设置全窗口背景图片,界面使用毛玻璃效果:
{
  "mode": "scenic",
  "backgroundImage": "https://example.com/background.jpg",
  "paper": "rgba(255, 255, 255, 0.1)",
  "navigator": "rgba(0, 0, 0, 0.3)",
  "popoverSolid": "#1a1a2e"
}
使用风景模式时,popoverSolid 必须设置为不透明颜色,避免弹窗背景透明导致文字难以阅读。

工作区主题覆盖#

每个工作区可以指定独立的颜色主题,覆盖全局主题设置:
在工作区 config.json 中:
{
  "defaults": {
    "colorTheme": "nord"
  }
}
这样切换工作区时,界面主题也会自动切换。
修改于 2026-03-16 10:01:13
上一页
工作区(Workspaces)
下一页
应用设置(App Settings)
Built with