Background color for Tk in Python Background color for Tk in Python tkinter tkinter

Background color for Tk in Python


root.configure(background='black')

or more generally

<widget>.configure(background='black')


I know this is kinda an old question but:

root["bg"] = "black"

will also do what you want and it involves less typing.


Its been updated so

root.configure(background="red")

is now:

root.configure(bg="red")