预览
调色板
ANSI
black
red
green
yellow
blue
magenta
cyan
white
b.Black
b.Red
b.Green
b.Yellow
b.Blue
b.Magenta
b.Cyan
b.White
基础颜色
背景
前景
光标
选区
对比度
WCAG · vs #282c34| Color | Hex | Ratio | Level |
|---|---|---|---|
| 前景 | #abb2bf | 6.57:1 | AA |
| 光标 | #abb2bf | 6.57:1 | AA |
| 选区 | #5c6370 | 2.32:1 | — |
| black | #1e2127 | 1.15:1 | — |
| red | #e06c75 | 4.38:1 | AA large |
| green | #98c379 | 6.94:1 | AA |
| yellow | #d19a66 | 5.68:1 | AA |
| blue | #61afef | 5.92:1 | AA |
| magenta | #c678dd | 4.75:1 | AA |
| cyan | #56b6c2 | 5.91:1 | AA |
| white | #abb2bf | 6.57:1 | AA |
| brightBlack | #5c6370 | 2.32:1 | — |
| brightRed | #e06c75 | 4.38:1 | AA large |
| brightGreen | #98c379 | 6.94:1 | AA |
| brightYellow | #d19a66 | 5.68:1 | AA |
| brightBlue | #61afef | 5.92:1 | AA |
| brightMagenta | #c678dd | 4.75:1 | AA |
| brightCyan | #56b6c2 | 5.91:1 | AA |
| brightWhite | #ffffff | 14.00:1 | AAA |
安装到 Alacritty
官方文档- 打开 ~/.config/alacritty/alacritty.toml。
- 用导出的 [colors] 配置块替换现有配置,或在主配置中 include 该文件。
- 保存后 Alacritty 会自动重新加载配置。
下载one-dark.toml
mkdir -p "$HOME/.config/alacritty/themes" && curl -fsSL "https://terminalthemes.iwwi.app/ports/alacritty/one-dark.toml" -o "$HOME/.config/alacritty/themes/one-dark.toml"
# Then add an import entry to alacritty.toml pointing at ~/.config/alacritty/themes/one-dark.toml完整配置文件
[colors.primary]
background = "#282c34"
foreground = "#abb2bf"
[colors.cursor]
text = "#282c34"
cursor = "#abb2bf"
[colors.selection]
text = "#ffffff"
background = "#5c6370"
[colors.normal]
black = "#1e2127"
red = "#e06c75"
green = "#98c379"
yellow = "#d19a66"
blue = "#61afef"
magenta = "#c678dd"
cyan = "#56b6c2"
white = "#abb2bf"
[colors.bright]
black = "#5c6370"
red = "#e06c75"
green = "#98c379"
yellow = "#d19a66"
blue = "#61afef"
magenta = "#c678dd"
cyan = "#56b6c2"
white = "#ffffff"
下载one-dark.toml
让 Agent 帮我安装
把这段提示词交给编码 Agent。它会读取 Alacritty 的安装页面、备份配置并只修改这个主题需要的文件。
帮我在这台机器上安装 One Dark 的 Alacritty 主题。
先阅读安装页面:https://terminalthemes.iwwi.app/zh/alacritty/themes/one/dark/
原生配置文件:https://terminalthemes.iwwi.app/ports/alacritty/one-dark.toml
请按以下步骤操作:
1. 打开 ~/.config/alacritty/alacritty.toml。
2. 用导出的 [colors] 配置块替换现有配置,或在主配置中 include 该文件。
3. 保存后 Alacritty 会自动重新加载配置。
一行安装命令:
mkdir -p "$HOME/.config/alacritty/themes" && curl -fsSL "https://terminalthemes.iwwi.app/ports/alacritty/one-dark.toml" -o "$HOME/.config/alacritty/themes/one-dark.toml"
# Then add an import entry to alacritty.toml pointing at ~/.config/alacritty/themes/one-dark.toml
请先检查并备份现有配置,只修改这个主题需要的设置,不要覆盖无关配置;如果要修改默认主题,先询问我。安装后验证文件存在并告诉我改了哪些文件。FAQ
常见问题
One Dark 的 Alacritty 主题文件放在哪里?
打开 ~/.config/alacritty/alacritty.toml。 用导出的 [colors] 配置块替换现有配置,或在主配置中 include 该文件。
如何在 Alacritty 中安装 One Dark?
下载本站生成的 One Dark configuration file,按页面中的一行安装命令放入 Alacritty 的配置位置;完成后保存后 Alacritty 会自动重新加载配置。
One Dark 在 Alacritty 中会改变颜色吗?
不会。它使用背景 #282c34、前景 #abb2bf 和完整的 16 色 ANSI 调色板,正文对比度为 6.6:1;只改变 Alacritty 需要的文件格式。
One Dark 还能用于其他终端吗?
可以。同一份调色板可以导出到 Herdr App、Ghostty、Alacritty、Kitty、iTerm2 和 Windows Terminal;每个版本只改变安装路径和文件格式。
相似主题