键盘颜色
键盘配色
「仓」沿用了 「Squirrel 鼠须管」的中的配色格式,即 BGR 格式。
当前流行色格式为 RGB 格式,所以直接将 RGB 格式的颜色复制到配色参数下,大概率显示结果会与您期望的不一样。
为什么使用 BGR 格式?为了与鼠须管保持一致,再深究的话,可以搜索下。
无论是RGB还是BGR,R:Red,G:Green,B:Blue,都使用十六进制中两位数字来表示 Red/Green/Blue 中的一种颜色。
十六进制中的数字:1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
以下图为例:
上面是BGR格式颜色,下面是对应的RGB格式颜色。您会发现他们只是交换了一下 R 与 B 所表示的的两位数字的位置。
您在配置文件中会发现有的颜色是八位长度,非上面说的 BGR 的六位数字长度。这是因为八位长度0x后的2位是透明度,例如0x50FFFFFF,这里的50就表示透明度。如果用六位表示,则没有透明度,例如0xFFFFFF。
注意注意注意:完全透明会导致点击事件不生效,也就是点击按键后无反应,使用透明度最低01,无法00全透明!!!!
| 透明度 | 16进制表示 |
|---|---|
| 100% | 00(全透明) |
| 99% | 03 |
| 98% | 05 |
| 97% | 07 |
| 96% | 0A |
| 95% | 0D |
| 94% | 0F |
| 93% | 12 |
| 92% | 14 |
| 91% | 17 |
| 90% | 1A |
| 89% | 1C |
| 88% | 1E |
| 87% | 21 |
| 86% | 24 |
| 85% | 26 |
| 84% | 29 |
| 83% | 2B |
| 82% | 2E |
| 81% | 30 |
| 80% | 33 |
| 79% | 36 |
| 78% | 38 |
| 77% | 3B |
| 76% | 3D |
| 75% | 40 |
| 74% | 42 |
| 73% | 45 |
| 72% | 47 |
| 71% | 4A |
| 70% | 4D |
| 69% | 4F |
| 68% | 52 |
| 67% | 54 |
| 66% | 57 |
| 65% | 59 |
| 64% | 5C |
| 63% | 5E |
| 62% | 61 |
| 61% | 63 |
| 60% | 66 |
| 59% | 69 |
| 58% | 6B |
| 57% | 6E |
| 56% | 70 |
| 55% | 73 |
| 54% | 75 |
| 53% | 78 |
| 52% | 7A |
| 51% | 7D |
| 50% | 80 |
| 49% | 82 |
| 48% | 85 |
| 47% | 87 |
| 46% | 8A |
| 45% | 8C |
| 44% | 8F |
| 43% | 91 |
| 42% | 94 |
| 41% | 96 |
| 40% | 99 |
| 39% | 9C |
| 38% | 9E |
| 37% | A1 |
| 36% | A3 |
| 35% | A6 |
| 34% | A8 |
| 33% | AB |
| 32% | AD |
| 31% | B0 |
| 30% | B3 |
| 29% | B5 |
| 28% | B8 |
| 27% | BA |
| 26% | BD |
| 25% | BF |
| 24% | C2 |
| 23% | C4 |
| 22% | C7 |
| 21% | C9 |
| 20% | CC |
| 19% | CF |
| 18% | D1 |
| 17% | D4 |
| 16% | D6 |
| 15% | D9 |
| 14% | DB |
| 13% | DE |
| 12% | E0 |
| 11% | E3 |
| 10% | E6 |
| 9% | E8 |
| 8% | EB |
| 7% | ED |
| 6% | F0 |
| 5% | F2 |
| 4% | F5 |
| 3% | F7 |
| 2% | FA |
| 1% | FC |
| 0% | FF(完全不透明) |
配色参数说明
以 曬經・月/Solarized Dark,曬經・日/Solarized Light 配色为例:
注意:配置文件中的颜色的必须以 0x 开头,0x 只是表明格式为十六进制,且程序也是以十六进制做处理的,别想着省略 0x,或者转为别的进制。
- schemaName: solarized_dark name: 曬經・月/Solarized Dark author: 雪齋 <lyc20041@gmail.com>/Morse <morse.hsiao@gmail.com> back_color: 0xF0352A0A # 键盘背景色 button_back_color: 0xF0352A0A # 按键背景色 button_pressed_back_color: 0xF0352A0A # 按下时按键背景色 button_front_color: 0x7389FF # 按键上文字颜色 button_pressed_front_color: 0x7389FF # 按下时按键上文字颜色 button_swipe_front_color: 0x7389FF # 按键上划动手势文字的颜色 corner_radius: 5 # 按键圆角半径 border_color: 0x2A1F00 # 按键边框颜色 text_color: 0x756E5D # 组字区域文字颜色 hilited_candidate_back_color: 0x403516 # 候选栏首选文字区域背景色 hilited_candidate_text_color: 0x989F52 # 候选栏首选文字颜色 hilited_comment_text_color: 0x289989 # 候选栏首选文字 Comment 信息颜色 candidate_text_color: 0x7389FF # 候选栏次选文字颜色 comment_text_color: 0xC38AFF # 候选栏次选文字 Comment 信息颜色- schemaName: solarized_light name: 曬經・日/Solarized Light author: 雪齋 <lyc20041@gmail.com>/Morse <morse.hsiao@gmail.com> back_color: 0xF0E5F6FB # 键盘背景色 button_back_color: 0xF0E5F6FB # 按键背景色 button_pressed_back_color: 0xF0E5F6FB # 按下时按键背景色 button_front_color: 0x595E00 # 按键上文字颜色 button_pressed_front_color: 0x595E00 # 按下时按键上文字颜色 button_swipe_front_color: 0x595E00 # 按键上划动手势文字的颜色 corner_radius: 5 # 按键圆角半径 border_color: 0xEDFFFF # 按键边框颜色 text_color: 0xA1A095 # 组字区域文字颜色 hilited_candidate_back_color: 0xD7E8ED # 候选栏首选文字区域背景色 hilited_candidate_text_color: 0x3942CB # 候选栏首选文字颜色 hilited_comment_text_color: 0x8144C2 # 候选栏首选文字 Comment 信息颜色 candidate_text_color: 0x595E00 # 候选栏次选文字颜色 comment_text_color: 0x005947 # 候选栏次选文字 Comment 信息颜色
键盘配色
back_color: 键盘背景色
按键配色参数
button_back_color: 按键背景色button_pressed_back_color: 按下时按键背景色button_foreground_color: 按键上文字颜色button_pressed_foreground_color:当按键按下时,按键上文字颜色button_swipe_foreground_color: 按键划动手势文字颜色corner_radius: 按键的圆角半径border_color:按键边框色shadow_color: 按键阴影shadow_size:阴影大小
候选栏配色参数
text_color:组字区文字颜色hilited_candidate_text_color:候选栏首选文字颜色hilited_comment_text_color:候选栏首选文字 Comment 信息颜色hilited_candidate_back_color: 候选栏首选文字区域背景色hilited_candidate_label_color: 候选栏首选序号颜色candidate_text_color:候选栏次选文字颜色comment_text_color:候选栏次选文字 Comment 信息颜色label_color: 候选栏次选序号颜色
长按 Action
hilited_callout_back_color: 长按首选背景色hilited_callout_foreground_color长按首选文字颜色
按键气泡
button_bubble_back_color:按键气泡颜色(可选),为空时使用button_back_color作为气泡颜色,长按 Action 的背景色等同此颜色