Ghostty Color Scheme
当然还是 iterm2 的 flat 配色比较经典,想要移植过来;但是整体移过来后,同样的色值,显示却不一样;
最后用吸色软件获取颜色对比后,发现是 iterm2 对颜色的渲染有问题,导致颜色显示不一致;
下面先说明如何应用与「#002240 → #002F52」相同的转换过程,随后给出所有颜色的转换结果列表,并在结尾附上本次答复的日语词汇表。
1. 转换过程回顾
在之前的说明中,#002240(R=0, G=34, B=64)转变为 #002F52(R=0, G=47, B=82)。
- 红色通道:0 → 0(无变化)
- 绿色通道:34 → 47(+13)
- 蓝色通道:64 → 82(+18)
因此,可将此视为对每个颜色的 (R, G, B) 分量执行下列操作:
- R 通道:保持不变
- G 通道:+13(若超过 255 则取 255)
- B 通道:+18(若超过 255 则取 255)
注意:如果加法结果超过 255,需要进行上限裁剪(Clamp to 255),因为通道的数值范围是 0~255。
2. 具体颜色转换结果
以下依照您所提供的各项颜色(palette 0~15、background、foreground 等),将同样的加法转换应用到所有 Hex 颜色码,计算并给出新的结果。若出现通道溢出,则裁剪为 0xFF(十六进制为 FF)。
2.1 Palette 部分
-
palette 0 = #222d3f
- (R,G,B) = (0x22, 0x2d, 0x3f) = (34, 45, 63)
- 新 (R,G,B) = (34, 45+13=58, 63+18=81) = (0x22, 0x3A, 0x51)
- → #223A51
-
palette 1 = #a82320
- (R,G,B) = (0xa8, 0x23, 0x20) = (168, 35, 32)
- 新 (R,G,B) = (168, 35+13=48, 32+18=50) = (0xa8, 0x30, 0x32)
- → #a83032
-
palette 2 = #32a548
- (R,G,B) = (0x32, 0xa5, 0x48) = (50, 165, 72)
- 新 (R,G,B) = (50, 165+13=178, 72+18=90) = (0x32, 0xb2, 0x5a)
- → #32b25a
-
palette 3 = #e58d11
- (R,G,B) = (0xe5, 0x8d, 0x11) = (229, 141, 17)
- 新 (R,G,B) = (229, 141+13=154, 17+18=35) = (0xe5, 0x9a, 0x23)
- → #e59a23
-
palette 4 = #3167ac
- (R,G,B) = (0x31, 0x67, 0xac) = (49, 103, 172)
- 新 (R,G,B) = (49, 103+13=116, 172+18=190) = (0x31, 0x74, 0xbe)
- → #3174be
-
palette 5 = #781aa0
- (R,G,B) = (0x78, 0x1a, 0xa0) = (120, 26, 160)
- 新 (R,G,B) = (120, 26+13=39, 160+18=178) = (0x78, 0x27, 0xb2)
- → #7827b2
-
palette 6 = #2c9370
- (R,G,B) = (0x2c, 0x93, 0x70) = (44, 147, 112)
- 新 (R,G,B) = (44, 147+13=160, 112+18=130) = (0x2c, 0xa0, 0x82)
- → #2ca082
-
palette 7 = #b0b6ba
- (R,G,B) = (0xb0, 0xb6, 0xba) = (176, 182, 186)
- 新 (R,G,B) = (176, 182+13=195, 186+18=204) = (0xb0, 0xc3, 0xcc)
- → #b0c3cc
-
palette 8 = #212c3c
- (R,G,B) = (0x21, 0x2c, 0x3c) = (33, 44, 60)
- 新 (R,G,B) = (33, 44+13=57, 60+18=78) = (0x21, 0x39, 0x4e)
- → #21394e
-
palette 9 = #d4312e
- (R,G,B) = (0xd4, 0x31, 0x2e) = (212, 49, 46)
- 新 (R,G,B) = (212, 49+13=62, 46+18=64) = (0xd4, 0x3e, 0x40)
- → #d43e40
-
palette 10 = #2d9440
- (R,G,B) = (0x2d, 0x94, 0x40) = (45, 148, 64)
- 新 (R,G,B) = (45, 148+13=161, 64+18=82) = (0x2d, 0xa1, 0x52)
- → #2da152
-
palette 11 = #e5be0c
- (R,G,B) = (0xe5, 0xbe, 0x0c) = (229, 190, 12)
- 新 (R,G,B) = (229, 190+13=203, 12+18=30) = (0xe5, 0xcb, 0x1e)
- → #e5cb1e
-
palette 12 = #3c7dd2
- (R,G,B) = (0x3c, 0x7d, 0xd2) = (60, 125, 210)
- 新 (R,G,B) = (60, 125+13=138, 210+18=228) = (0x3c, 0x8a, 0xe4)
- → #3c8ae4
-
palette 13 = #8230a7
- (R,G,B) = (0x82, 0x30, 0xa7) = (130, 48, 167)
- 新 (R,G,B) = (130, 48+13=61, 167+18=185) = (0x82, 0x3d, 0xb9)
- → #823db9
-
palette 14 = #35b387
- (R,G,B) = (0x35, 0xb3, 0x87) = (53, 179, 135)
- 新 (R,G,B) = (53, 179+13=192, 135+18=153) = (0x35, 0xc0, 0x99)
- → #35c099
-
palette 15 = #e7eced
- (R,G,B) = (0xe7, 0xec, 0xed) = (231, 236, 237)
- 新 (R,G,B) = (231, 236+13=249, 237+18=255) = (0xe7, 0xf9, 0xff)
- → #e7f9ff
2.2 其余颜色
-
background = #002240
- 此即原例:转为 #002F52
-
foreground = #2cc55d
- (R,G,B) = (0x2c, 0xc5, 0x5d) = (44, 197, 93)
- 新 (R,G,B) = (44, 197+13=210, 93+18=111) = (0x2c, 0xd2, 0x6f)
- → #2cd26f
-
cursor-color = #e5be0c
- 同 palette 11,一致转为 #e5cb1e
-
selection-background = #792b9c
- (R,G,B) = (0x79, 0x2b, 0x9c) = (121, 43, 156)
- 新 (R,G,B) = (121, 43+13=56, 156+18=174) = (0x79, 0x38, 0xae)
- → #7938ae
-
selection-foreground = #ffffff
- (R,G,B) = (255, 255, 255)
- 新 (R,G,B) = (255, 255+13=268→255, 255+18=273→255) → 超出 255 时裁剪至 255
- → #ffffff(保持不变)
3. 最终新的配色方案
可按与原始配置相同的格式,列出如下(仅供参考,也可直接使用上述逐一结果):
palette = 0=#223A51
palette = 1=#a83032
palette = 2=#32b25a
palette = 3=#e59a23
palette = 4=#3174be
palette = 5=#7827b2
palette = 6=#2ca082
palette = 7=#b0c3cc
palette = 8=#21394e
palette = 9=#d43e40
palette = 10=#2da152
palette = 11=#e5cb1e
palette = 12=#3c8ae4
palette = 13=#823db9
palette = 14=#35c099
palette = 15=#e7f9ff
background = #002F52
foreground = #2cd26f
cursor-color = #e5cb1e
selection-background = #7938ae
selection-foreground = #ffffff
如上,即在 RGB 值的绿色通道上加 13、蓝色通道上加 18(溢出则裁剪),得到的统一增亮或提升饱和度的效果。
当前的配置
macos-titlebar-style = tabs
quick-terminal-position = "top"
quick-terminal-screen = "main"
quick-terminal-animation-duration = 0.23
keybind = "global:cmd+shift+t=toggle_quick_terminal"
background-opacity = 0.9
palette = 0=#223A51
palette = 1=#a83032
palette = 2=#32b25a
palette = 3=#e59a23
palette = 4=#3174be
palette = 5=#7827b2
palette = 6=#2ca082
palette = 7=#b0c3cc
palette = 8=#21394e
palette = 9=#d43e40
palette = 10=#2da152
palette = 11=#e5cb1e
palette = 12=#3c8ae4
palette = 13=#823db9
palette = 14=#35c099
palette = 15=#e7f9ff
background = #002F52
foreground = #2cd26f
cursor-color = #e5cb1e
selection-background = #7938ae
selection-foreground = #ffffff
日语单词和短语提取表
Japanese characters | Hiragana reading | English translation | Chinese meaning | Related phrases (with hiragana reading) or idiomatic expressions |
---|---|---|---|---|
パレット | ぱれっと | Palette | 调色板、颜色列表 | カラーパレット (からーぱれっと) - 色彩调色板 |
変換 | へんかん | Transformation / Conversion | 转换、变换 | 数値変換 (すうち へんかん) - 数值转换 |
加算 | かさん | Addition | 加法 | 加算処理 (かさん しょり) - 加法处理 |
裁剪 | さいせん(※“クリップ”更常用外来语) | Clipping | 裁剪、截断(在计算机图形中指超过范围截取) | クリップ (くりっぷ) - 裁剪、限定;範囲を超える (はんい を こえる) - 超出范围 |
明度 | めいど | Brightness / Lightness | 亮度、明度 | 明度を上げる (めいど を あげる) - 提高亮度 |
飽和度 | ほうわど | Saturation | 饱和度 | 彩度 (さいど) 也同义;彩度を上げる (さいど を あげる) - 提高饱和度 |
色コード | いろ こーど | Color code | 颜色代码 | 16 進数カラーコード (じゅうろくしんすう からーこーど) - 十六进制颜色代码 |
上限値 | じょうげんち | Upper limit | 最大值 | 255 が最大値 (255 が さいだいち) - 255 是最大值 |
溢出 | いっしゅつ(※一般常用“オーバーフロー”) | Overflow | 超出范围 | オーバーフロー (おーばーふろー) - 溢出 |
如有其他关于色彩处理、前端设计或相关问题,欢迎继续提出。