跳到主要內容

GitHub

GitHub 是一套淺色終端機配色(柔和),背景色 #f4f4f4,文字色 #3e3e3e,對比度 9.7:1

取得設定檔
背景色
#f4f4f4
前景色
#3e3e3e
文字對比度
9.72:1AAA
強調色對比度
3.51:1最低 1.06
zsh — ls & git status
zsh — ls & git status
zsh — ls & git status
zsh — ls & git status
zsh — ls & git status — Konsole
~/dev/tintdex on main [!?] via ⬢ v1.4.3
❯ ls -la
drwxr-xr-x 12 ada staff 384 Oct 30 09:12 .
drwxr-xr-x 8 ada staff 256 Oct 29 18:40 ..
-rw-r--r-- 1 ada staff 1.2K Oct 30 09:10 .gitignore
drwxr-xr-x 5 ada staff 160 Oct 30 09:12 src
drwxr-xr-x 3 ada staff 96 Oct 28 11:02 public
-rwxr-xr-x 1 ada staff 2.4K Oct 30 08:57 build.sh
-rw-r--r-- 1 ada staff 4.1K Oct 30 09:01 package.json
lrwxr-xr-x 1 ada staff 18 Oct 27 14:33 node_modules -> ../cache/modules
-rw-r--r-- 1 ada staff 48K Oct 26 10:15 logo.png
-rw-r--r-- 1 ada staff 9.8M Oct 25 21:47 backup.tar.gz
~/dev/tintdex on main [!?] via ⬢ v1.4.3
❯ git status
On branch main
Your branch is ahead of 'origin/main' by 2 commits.
Changes to be committed:
new file: src/theme.css
modified: README.md
Changes not staged for commit:
modified: src/app.tsx
deleted: legacy/colors.js
Untracked files:
notes.md
~/dev/tintdex on main [!?] via ⬢ v1.4.3
❯

GitHub 的設定檔

16 種格式,都從同一份色板產生

GitHub

存到 ~/.config/ghostty/themes/GitHub,再在 config 或 config.ghostty 裏寫 theme = GitHub

更多 Ghostty 配色
原始檔案
# Theme: GitHub (Ghostty)
# Preview & customize online: https://tintdex.afengim.com/zh-hk/schemes/github?format=ghostty

palette = 0=#3e3e3e
palette = 1=#970b16
palette = 2=#07962a
palette = 3=#f8eec7
palette = 4=#003e8a
palette = 5=#e94691
palette = 6=#89d1ec
palette = 7=#ffffff
palette = 8=#666666
palette = 9=#de0000
palette = 10=#87d5a2
palette = 11=#f1d007
palette = 12=#2e6cba
palette = 13=#ffa29f
palette = 14=#1cfafe
palette = 15=#ffffff
background = #f4f4f4
foreground = #3e3e3e
cursor-color = #3f3f3f
cursor-text = #f4f4f4
selection-background = #a9c1e2
selection-foreground = #535353

GitHub 色板

色板各槽位的色值及其相對背景的 WCAG 對比度
顏色槽位HEXRGBHSLOKLCH對比度
背景色background#f4f4f4rgb(244 244 244)hsl(0 0% 96%)oklch(96.7% 0.000 0)—
前景色foreground#3e3e3ergb(62 62 62)hsl(0 0% 24%)oklch(36.4% 0.000 0)9.72 AAA
光標cursor#3f3f3frgb(63 63 63)hsl(0 0% 25%)oklch(36.8% 0.000 0)9.57 AAA
光標文字cursorText#f4f4f4rgb(244 244 244)hsl(0 0% 96%)oklch(96.7% 0.000 0)1.00 低於 AA
選取範圍selection#a9c1e2rgb(169 193 226)hsl(215 50% 77%)oklch(80.4% 0.054 256.4)1.67 低於 AA
選取文字selectionText#535353rgb(83 83 83)hsl(0 0% 33%)oklch(44.2% 0.000 0)6.99 AA
黑color0#3e3e3ergb(62 62 62)hsl(0 0% 24%)oklch(36.4% 0.000 0)9.72 AAA
紅color1#970b16rgb(151 11 22)hsl(355 86% 32%)oklch(43.0% 0.169 25.9)8.04 AAA
綠color2#07962argb(7 150 42)hsl(135 91% 31%)oklch(58.6% 0.181 145.1)3.53 AA 大字體
黃color3#f8eec7rgb(248 238 199)hsl(48 78% 88%)oklch(94.7% 0.052 95.3)1.06 低於 AA
藍color4#003e8argb(0 62 138)hsl(213 100% 27%)oklch(38.0% 0.139 257.7)9.29 AAA
洋紅color5#e94691rgb(233 70 145)hsl(332 79% 59%)oklch(64.7% 0.208 356.5)3.32 AA 大字體
青color6#89d1ecrgb(137 209 236)hsl(196 72% 73%)oklch(82.3% 0.081 223.7)1.54 低於 AA
白color7#ffffffrgb(255 255 255)hsl(0 0% 100%)oklch(100.0% 0.000 0)1.10 低於 AA
亮黑color8#666666rgb(102 102 102)hsl(0 0% 40%)oklch(51.0% 0.000 0)5.22 AA
亮紅color9#de0000rgb(222 0 0)hsl(0 100% 44%)oklch(56.6% 0.232 29.2)4.65 AA
亮綠color10#87d5a2rgb(135 213 162)hsl(141 48% 68%)oklch(80.9% 0.106 154.7)1.58 低於 AA
亮黃color11#f1d007rgb(241 208 7)hsl(52 94% 49%)oklch(86.0% 0.177 97.4)1.39 低於 AA
亮藍color12#2e6cbargb(46 108 186)hsl(213 60% 45%)oklch(53.1% 0.138 255.7)4.81 AA
亮洋紅color13#ffa29frgb(255 162 159)hsl(2 100% 81%)oklch(80.5% 0.111 21.8)1.75 低於 AA
亮青color14#1cfafergb(28 250 254)hsl(181 99% 55%)oklch(89.5% 0.150 196.9)1.18 低於 AA
亮白color15#ffffffrgb(255 255 255)hsl(0 0% 100%)oklch(100.0% 0.000 0)1.10 低於 AA

關於 GitHub

GitHub 採用中性色調的淺色背景(#f4f4f4),預設前景色為 #3e3e3e。正文的 WCAG 對比度為 9.72:1(AAA),12 種 ANSI 彩色槽位平均對比度 3.51:1,最低 1.06:1。

色板整體色彩飽和度適中,其中紅色為 #970b16、綠色為 #07962a、藍色為 #003e8a、洋紅為 #e94691。該配色歸屬 GitHub 主題系列。

支援一鍵匯出 Ghostty、iTerm2、Kitty、Alacritty、WezTerm、Windows Terminal、Warp、foot、Rio、XFCE4 Terminal、Xresources 終端機設定檔,同時提供 VS Code 與 Zed 整合終端機、CSS 變數、Tailwind CSS 及 JSON 色板格式。

與 GitHub 相似的配色

資料來源:iTerm2 Color Schemes (MIT)