跳到主要內容

Github Contrast

Github Contrast 是一套深色終端機配色,背景色 #111111,文字色 #ffffff,對比度 18.9:1

取得設定檔
背景色
#111111
前景色
#ffffff
文字對比度
18.88:1AAA
強調色對比度
8.44:1最低 2.87
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 Contrast 的設定檔

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

Github Contrast

存到 ~/.config/ghostty/themes/Github Contrast,再在 config 或 config.ghostty 裡寫 theme = Github Contrast

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

palette = 0=#1e1e1e
palette = 1=#ba0e2e
palette = 2=#7385bc
palette = 3=#66c4c4
palette = 4=#e53d67
palette = 5=#cccccc
palette = 6=#5a6fad
palette = 7=#ffffff
palette = 8=#373737
palette = 9=#e61f44
palette = 10=#b8c1dd
palette = 11=#b0e0e0
palette = 12=#f197ad
palette = 13=#ffffff
palette = 14=#9eaacf
palette = 15=#ffffff
background = #111111
foreground = #ffffff
cursor-color = #ffffff
cursor-text = #ffffff
selection-background = #008080
selection-foreground = #ffffff

Github Contrast 色票

色票各槽位的色值及其相對背景的 WCAG 對比度
顏色槽位HEXRGBHSLOKLCH對比度
背景色background#111111rgb(17 17 17)hsl(0 0% 7%)oklch(17.8% 0.000 0)—
前景色foreground#ffffffrgb(255 255 255)hsl(0 0% 100%)oklch(100.0% 0.000 0)18.88 AAA
游標cursor#ffffffrgb(255 255 255)hsl(0 0% 100%)oklch(100.0% 0.000 0)18.88 AAA
游標文字cursorText#ffffffrgb(255 255 255)hsl(0 0% 100%)oklch(100.0% 0.000 0)18.88 AAA
選取範圍selection#008080rgb(0 128 128)hsl(180 100% 25%)oklch(54.3% 0.093 194.8)3.96 AA 大字級
選取文字selectionText#ffffffrgb(255 255 255)hsl(0 0% 100%)oklch(100.0% 0.000 0)18.88 AAA
黑color0#1e1e1ergb(30 30 30)hsl(0 0% 12%)oklch(23.5% 0.000 0)1.13 低於 AA
紅color1#ba0e2ergb(186 14 46)hsl(349 86% 39%)oklch(50.3% 0.196 21.1)2.87 低於 AA
綠color2#7385bcrgb(115 133 188)hsl(225 35% 59%)oklch(62.4% 0.086 269.9)5.22 AA
黃color3#66c4c4rgb(102 196 196)hsl(180 44% 58%)oklch(76.3% 0.089 195.4)9.22 AAA
藍color4#e53d67rgb(229 61 103)hsl(345 76% 57%)oklch(62.0% 0.204 11.1)4.67 AA
洋紅color5#ccccccrgb(204 204 204)hsl(0 0% 80%)oklch(84.5% 0.000 0)11.76 AAA
青color6#5a6fadrgb(90 111 173)hsl(225 34% 52%)oklch(55.2% 0.100 268.8)3.88 AA 大字級
白color7#ffffffrgb(255 255 255)hsl(0 0% 100%)oklch(100.0% 0.000 0)18.88 AAA
亮黑color8#373737rgb(55 55 55)hsl(0 0% 22%)oklch(33.7% 0.000 0)1.59 低於 AA
亮紅color9#e61f44rgb(230 31 68)hsl(349 80% 51%)oklch(59.5% 0.225 19.4)4.18 AA 大字級
亮綠color10#b8c1ddrgb(184 193 221)hsl(225 35% 79%)oklch(81.3% 0.041 271.4)10.53 AAA
亮黃color11#b0e0e0rgb(176 224 224)hsl(180 44% 78%)oklch(87.3% 0.050 196.3)13.11 AAA
亮藍color12#f197adrgb(241 151 173)hsl(345 76% 77%)oklch(77.4% 0.111 4.1)8.79 AAA
亮洋紅color13#ffffffrgb(255 255 255)hsl(0 0% 100%)oklch(100.0% 0.000 0)18.88 AAA
亮青color14#9eaacfrgb(158 170 207)hsl(225 34% 72%)oklch(74.1% 0.055 270.9)8.19 AAA
亮白color15#ffffffrgb(255 255 255)hsl(0 0% 100%)oklch(100.0% 0.000 0)18.88 AAA

關於 Github Contrast

Github Contrast 採用中性色調的深色背景(#111111),預設前景色為 #ffffff。內文的 WCAG 對比度為 18.88:1(AAA),12 種 ANSI 彩色槽位平均對比度 8.44:1,最低 2.87:1。

色票整體色彩彩度適中,其中紅色為 #ba0e2e、綠色為 #7385bc、藍色為 #e53d67、洋紅為 #cccccc。此配色歸屬 GitHub 主題系列。

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

與 Github Contrast 相似的配色

資料來源:Rainglow (MIT)