python 中的空闲背景颜色
IDLE background color in python
有没有办法改变python-3.5 IDLE 在windows 10 下的背景颜色?
我试过 google 和阅读文档,但找不到答案。我不确定这是否可能...
对于文本 window 背景,转到选项 => IDLE 首选项 => 突出显示选项卡。使用新名称将内置主题(两者相同)另存为自定义主题。将具有白色背景的每个元素的背景更改为您想要的颜色。点击应用或确定。或者,将以下内容复制到 <HOMEDIR>/.idlerc/config-highlight.cfg
(可能已经存在也可能不存在)并将 #ffffff
更改为您想要的颜色。
[Custom Light]
normal-foreground= #000000
normal-background= #ffffff
keyword-foreground= #ff7700
keyword-background= #ffffff
builtin-foreground= #900090
builtin-background= #ffffff
comment-foreground= #dd0000
comment-background= #ffffff
string-foreground= #00aa00
string-background= #ffffff
definition-foreground= #0000ff
definition-background= #ffffff
hilite-foreground= #000000
hilite-background= gray
break-foreground= black
break-background= #ffff55
hit-foreground= #ffffff
hit-background= #000000
error-foreground= #000000
error-background= #ff7777
#cursor (only foreground can be set, restart IDLE)
cursor-foreground= black
#shell window
stdout-foreground= blue
stdout-background= #ffffff
stderr-foreground= red
stderr-background= #ffffff
console-foreground= #770000
console-background= #ffffff
我们刚刚添加了一个带有深钴蓝色背景的 IDLE Dark 主题。为此,请保持 #002240
不变或更改为另一种深色。
[Custom Dark]
comment-foreground = #dd0000
console-foreground = #ff4d4d
error-foreground = #FFFFFF
hilite-background = #7e7e7e
string-foreground = #02ff02
stderr-background = #002240
stderr-foreground = #ffb3b3
console-background = #002240
hit-background = #fbfbfb
string-background = #002240
normal-background = #002240
hilite-foreground = #FFFFFF
keyword-foreground = #ff8000
error-background = #c86464
keyword-background = #002240
builtin-background = #002240
break-background = #808000
builtin-foreground = #ff00ff
definition-foreground = #5e5eff
stdout-foreground = #c2d1fa
definition-background = #002240
normal-foreground = #FFFFFF
cursor-foreground = #ffffff
stdout-background = #002240
hit-foreground = #002240
comment-background = #002240
break-foreground = #FFFFFF
我们计划添加一种方法来一次更改所有正常背景。能够影响对话框将是以后的项目。
步骤如下:
- 打开空闲
- 转到顶部选项卡中的 "OPTIONS"
- Select "Configure IDLE"
- Select "Highlights" 来自顶部水平选项卡
- Select "Background" 左侧 IDLE 图像正上方的单选按钮
- 在 "Highlight Theme" 下的右侧,根据您的喜好点击 "IDLE Classic/IDLE Dark/IDLE New"
单击“应用”,然后单击“确定”
完成!
按照这些步骤保护您的眼睛。
从您在安装 Python 期间选择的路径打开 Python 文件夹。在这种情况下它是 ( C:\Python27 )
在 Python27 文件夹中,搜索 Lib 并双击它。
在Lib文件夹中,搜索idlelib文件夹并双击它。
在 idlelib 文件夹中,搜索 CONFIG-HIGHLIGHT.DEF 文件,然后使用任何文本编辑器工具(如记事本)打开它。
在 CONFIG-HIGHLIGHT.DEF 文件中,粘贴下面给出的 Monokai 代码。保存并关闭文件。
[monokai]
normal-foreground= #F8F8F2
normal-background= #272822
keyword-foreground= #F92672
keyword-background= #272822
builtin-foreground= #66D9EF
builtin-background= #272822
comment-foreground= #75715E
comment-background= #272822
string-foreground= #E6DB74
string-background= #272822
definition-foreground= #A6E22E
definition-background= #272822
hilite-foreground= #F8F8F2
hilite-background= gray
break-foreground= black
break-background= #ffff55
hit-foreground= #F8F8F2
hit-background= #171812
error-foreground= #ff3338
error-background= #272822
cursor-foreground= #F8F8F2
stdout-foreground= #DDDDDD
stdout-background= #272822
stderr-foreground= #ff3338
stderr-background= #272822
console-foreground= #75715E
console-background= #272822
来源:CodeHexz
祝所有夜猫子们玩得开心 :)
闲置黑暗背景
Daniel Puiu 和 Megha Chovatiya 的上述回答非常好。我按照他们的指示进行,并且有额外的个人经验,我也想分享:
此说明会详细说明可申请定制版:
打开闲置
- 转到顶部选项卡中的“选项”
- Select“配置空闲”
- Select 顶部水平选项卡中的“亮点”
***因为我想让IDLE背景变暗,所以在Highligting theme -> Built-in theme -> 点击“IDLE class”改为“IDLE dark”
有一个小的编码图片,您可以单击它来select您想要更改颜色的特定编码参数。那么:
Select“背景”单选按钮,当你想改变文本的背景时,似乎是 word 文档中的高亮颜色
或select“前景”调整文字颜色
然后“选择颜色”为 select 您想要的颜色。可以同时看打码图看看你的变化
- 当您感觉不错时,请单击“应用”并为自定义命名。
此外,您可以根据需要更改文本大小或加粗文本:
从顶部的水平选项卡转到“Fonts/tab”并根据您的风格更改文本
有没有办法改变python-3.5 IDLE 在windows 10 下的背景颜色? 我试过 google 和阅读文档,但找不到答案。我不确定这是否可能...
对于文本 window 背景,转到选项 => IDLE 首选项 => 突出显示选项卡。使用新名称将内置主题(两者相同)另存为自定义主题。将具有白色背景的每个元素的背景更改为您想要的颜色。点击应用或确定。或者,将以下内容复制到 <HOMEDIR>/.idlerc/config-highlight.cfg
(可能已经存在也可能不存在)并将 #ffffff
更改为您想要的颜色。
[Custom Light]
normal-foreground= #000000
normal-background= #ffffff
keyword-foreground= #ff7700
keyword-background= #ffffff
builtin-foreground= #900090
builtin-background= #ffffff
comment-foreground= #dd0000
comment-background= #ffffff
string-foreground= #00aa00
string-background= #ffffff
definition-foreground= #0000ff
definition-background= #ffffff
hilite-foreground= #000000
hilite-background= gray
break-foreground= black
break-background= #ffff55
hit-foreground= #ffffff
hit-background= #000000
error-foreground= #000000
error-background= #ff7777
#cursor (only foreground can be set, restart IDLE)
cursor-foreground= black
#shell window
stdout-foreground= blue
stdout-background= #ffffff
stderr-foreground= red
stderr-background= #ffffff
console-foreground= #770000
console-background= #ffffff
我们刚刚添加了一个带有深钴蓝色背景的 IDLE Dark 主题。为此,请保持 #002240
不变或更改为另一种深色。
[Custom Dark]
comment-foreground = #dd0000
console-foreground = #ff4d4d
error-foreground = #FFFFFF
hilite-background = #7e7e7e
string-foreground = #02ff02
stderr-background = #002240
stderr-foreground = #ffb3b3
console-background = #002240
hit-background = #fbfbfb
string-background = #002240
normal-background = #002240
hilite-foreground = #FFFFFF
keyword-foreground = #ff8000
error-background = #c86464
keyword-background = #002240
builtin-background = #002240
break-background = #808000
builtin-foreground = #ff00ff
definition-foreground = #5e5eff
stdout-foreground = #c2d1fa
definition-background = #002240
normal-foreground = #FFFFFF
cursor-foreground = #ffffff
stdout-background = #002240
hit-foreground = #002240
comment-background = #002240
break-foreground = #FFFFFF
我们计划添加一种方法来一次更改所有正常背景。能够影响对话框将是以后的项目。
步骤如下:
- 打开空闲
- 转到顶部选项卡中的 "OPTIONS"
- Select "Configure IDLE"
- Select "Highlights" 来自顶部水平选项卡
- Select "Background" 左侧 IDLE 图像正上方的单选按钮
- 在 "Highlight Theme" 下的右侧,根据您的喜好点击 "IDLE Classic/IDLE Dark/IDLE New"
单击“应用”,然后单击“确定”
完成!
按照这些步骤保护您的眼睛。
从您在安装 Python 期间选择的路径打开 Python 文件夹。在这种情况下它是 ( C:\Python27 )
在 Python27 文件夹中,搜索 Lib 并双击它。
在Lib文件夹中,搜索idlelib文件夹并双击它。
在 idlelib 文件夹中,搜索 CONFIG-HIGHLIGHT.DEF 文件,然后使用任何文本编辑器工具(如记事本)打开它。
在 CONFIG-HIGHLIGHT.DEF 文件中,粘贴下面给出的 Monokai 代码。保存并关闭文件。
[monokai] normal-foreground= #F8F8F2 normal-background= #272822 keyword-foreground= #F92672 keyword-background= #272822 builtin-foreground= #66D9EF builtin-background= #272822 comment-foreground= #75715E comment-background= #272822 string-foreground= #E6DB74 string-background= #272822 definition-foreground= #A6E22E definition-background= #272822 hilite-foreground= #F8F8F2 hilite-background= gray break-foreground= black break-background= #ffff55 hit-foreground= #F8F8F2 hit-background= #171812 error-foreground= #ff3338 error-background= #272822 cursor-foreground= #F8F8F2 stdout-foreground= #DDDDDD stdout-background= #272822 stderr-foreground= #ff3338 stderr-background= #272822 console-foreground= #75715E console-background= #272822
来源:CodeHexz
祝所有夜猫子们玩得开心 :)
闲置黑暗背景
Daniel Puiu 和 Megha Chovatiya 的上述回答非常好。我按照他们的指示进行,并且有额外的个人经验,我也想分享:
此说明会详细说明可申请定制版:
打开闲置
- 转到顶部选项卡中的“选项”
- Select“配置空闲”
- Select 顶部水平选项卡中的“亮点”
***因为我想让IDLE背景变暗,所以在Highligting theme -> Built-in theme -> 点击“IDLE class”改为“IDLE dark”
有一个小的编码图片,您可以单击它来select您想要更改颜色的特定编码参数。那么:
Select“背景”单选按钮,当你想改变文本的背景时,似乎是 word 文档中的高亮颜色
或select“前景”调整文字颜色
然后“选择颜色”为 select 您想要的颜色。可以同时看打码图看看你的变化
- 当您感觉不错时,请单击“应用”并为自定义命名。
此外,您可以根据需要更改文本大小或加粗文本:
从顶部的水平选项卡转到“Fonts/tab”并根据您的风格更改文本