自定义主题网上有很多,3.10IDLE的UI有一些新的东西,直接扣过来会有些地方覆盖不到,需要自己测试着添几行配置,以下做个记录。
Python安装目录下的Lib\idlelib\config-highlight.def。如果是默认安装,一般路径为C:\Users\name\AppData\Local\Programs\Python\Python310\Lib\idlelib\config-highlight.def
AppData文件夹默认隐藏,如果找不到,记得设置显示隐藏文件。
在配置文件中加入以下内容,追加就好,原本有的内容不用删除:
[tango]
definition-foreground = #fce94f
error-foreground = #fa8072
string-background = #2e3436
keyword-foreground = #8cc4ff
normal-foreground = #ffffff
comment-background = #2e3436
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
context-foreground= #ffffff
context-background= #2e3436
linenumber-foreground= gray
linenumber-background= #2e3436
重启IDLE--options--Configure IDLE
Settings--Highlights--Highlighting Theme--选择tango--ok--Apply。