How to make a tkinter Label background transparent?
i think it can help, all black will be transparent
root.wm_attributes('-transparentcolor','black')
It is not supported with transparent backgrounds in Tk.
If you are working with images and putting text onto them, the most convenient way is - I think - utilizing Canvas
widget.
tkinter Canvas
widget has methods as .create_image(x, y, image=image, options)
and .create_text(x, y, text="Some text", options)
.
use this :
from tkinter import *
main=Tk()
photo=PhotoImage(file='test.png')
Label(main,image=photo,bg='grey').pack()
#your other label or button or ...
main.wm_attributes("-transparentcolor", 'grey')
main.mainloop()
this work if use bg='grey'
you can change it in line 7
good luck :)