python IDLE 背景修改 IDLE (Python GUI)

时间:2021-12-27 07:11:28

1. 修改背景颜色

win7 路径C:\Users\Administrator\.idlerc新建文件
config-Highlight.cfg

2. config-Highlight.cfg写入配置文件

[Obsidian]
definition-foreground = #ff8080
error-foreground = #FF0000
string-background = #494949
keyword-foreground = #e1031e
normal-foreground = #5ca404
comment-background = #293134
hit-foreground = #E0E2E4
builtin-background = #293134
stdout-foreground = #678CB1
cursor-foreground = #E0E2E4
break-background = #293134
comment-foreground = #5ae100
hilite-background = #2F393C
hilite-foreground = #E0E2E4
definition-background = #293134
stderr-background = #293134
hit-background = #000000
console-foreground = #E0E2E4
normal-background = #293134
builtin-foreground = #E0E2E4
stdout-background = #293134
console-background = #293134
stderr-foreground = #FB0000
keyword-background = #293134
string-foreground = #EC7600
break-foreground = #E0E2E4
error-background = #293134

[tango]
definition-foreground = #ff0000
error-foreground = #fa8072
string-background = #2e3436
keyword-foreground = #f8a80d
normal-foreground = #ffff00
comment-background = #2f2f2f
hit-foreground = #ffffff
break-foreground = #000000
builtin-background = #2e3436
stdout-foreground = #eeeeec
cursor-foreground = #fce94f
hit-background = #2e3436
comment-foreground = #73d216
hilite-background = #edd400
definition-background = #2e3436
stderr-background = #2e3436
break-background = #2e3436
console-foreground = #87ceeb
normal-background = #2e3436
builtin-foreground = #ad7fa8
stdout-background = #2e3436
console-background = #2e3436
stderr-foreground = #ff3e40
keyword-background = #2e3436
string-foreground = #e9b96e
hilite-foreground = #2e3436
error-background = #2e3436

3. 设置主题

重启python IDLE
Options > Configure IDLE >
Settings > Highlighting > a Custom Theme
Obsidian > tango
Apply 预览效果

4. 主题自定义颜色

Apply 预览效果
鼠标点击 def func(param)
Foregroud 代码颜色
Backgroud 背景颜色

参考:
1.如何修改python IDLE代码及语法主题 配色——拷贝的是别人喜欢的,来学会调试自己喜欢的颜色吧