Change the python tkinter window background color

 CHANGE THE PYTHON TKINTER WINDOW 

BACKGROUND COLOR

In this post we can see two example of python tkinter background color.

first is blue color and second is red color background color window application.

now we start.

1.Example

Code:

from tkinter import *
window = Tk()
window.title("Background color")
window.geometry("350x200")
window.configure(bg="blue")#blue color
window.mainloop()

OUTPUT

Tikinter backgorund Color Change

2. Example

Code:

from tkinter import *
window = Tk()
window.title("Background color")
window.geometry("350x200")
window.configure(bg="red")#Red background color
window.mainloop()

OUTPUT

Red background


Comments