Is there a way to change background color of python-3.5 IDLE under windows 10? I've tried google and reading docs, but i can't find the answer. I'm not sure it's even possible...
For text window backgrounds, go to Options => IDLE Preferences => Highlighting tab. Save the builtin theme (both are the same) as a custom theme, with a new name. Change the background of each element with a white background to the color you want. Hit Apply or OK. Alternatively, copy the following into <HOMEDIR>/.idlerc/config-highlight.cfg
(which may or may not exist already) and change #ffffff
to your desired color.
[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
We just added an IDLE Dark theme with a deep cobalt blue background. For this, leave #002240
as is or change to another dark color.
[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
We are planning to add a means to change all the normal backgrounds at once. Being able to affect dialogs will be a later project.
<HOMEDIR>/.idlerc/config-highlight.cfg
? As I said, it "may or may not exist already". It is definitely used in 3.8.1. All-backgrounds-at-once has not happened yet. –
Valle <pythonDir>/Lib/idlelib/config-highlight.def
–
Plagiary Following are the steps:
- Open IDLE
- Go to "OPTIONS" in the top tab
- Select "Configure IDLE"
- Select "Highlights" from top horizontal tab
- Select "Background" radio button just above the image of IDLE on the left hand side
- On the right hand side under "Highlight Theme" click on "IDLE Classic/IDLE Dark/IDLE New" as per your preference
Click Apply and Then Click OK
Done!
Follow these steps & protect your eyes.
Open Python Folder from the path you selected during installing Python. In this case it is ( C:\Python27 )
In Python27 Folder, search for Lib and double click on it.
In the Lib folder, search for idlelib folder and double click on it.
In idlelib folder, search for CONFIG-HIGHLIGHT.DEF file and open it with any text editor tool like Notepad.
In the CONFIG-HIGHLIGHT.DEF file, paste the Monokai Code given below. Save and close the file.
[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
Source: CodeHexz
HAPPY PYTHONING TO ALL NIGHT OWLS :)
FOR IDLE DARK BACKGROUND
The above answer of Daniel Puiu and Megha Chovatiya is so good. I follow their instruction and have extra personal experience that I also want to share:
This instruction will be detailed that can apply for custom version:
Open IDLE
- Go to "OPTIONS" in the top tab
- Select "Configure IDLE"
- Select "Highlights" from top horizontal tab
***Because I want the IDLE background to be dark so in Highligting theme -> Built-in theme -> click "IDLE class" change to "IDLE dark"
There is a small coding picture that you can click to select the specific coding parameter you want to change the color. Then:
Select "Background" radio button when you want to change the background of the text that seem to be the highlight color in word document
Or select "Foreground" to adjust the color of the text
And "Choose color for" to select color you want. You can look the coding picture at the same time to see your change
- When you feel good click "Apply" and name the custom.
Furthermore, you could change the size of text or bold the text if you want by:
Go to "Fonts/tab" from the top horizontal tab and change the text following your style
© 2022 - 2024 — McMap. All rights reserved.