I want to make some portion of a tkinter window transparent. I have successfully achieved it in windows and mac os using the following methods:
In windows:
root.attributes("-transparentcolor", '#000001')
root.config(bg="#000001")
In mac:
root.attributes("-transparent", True)
root.config(bg="systemTransparent")
But I can't find any solution for linux, none of the above methods are working in linux (Ubuntu) because it doesn't have any tranparent
attribute. Moreover, I don't want to use -alpha
attribute because it makes the whole window transparent (including the widgets). What I want is full transparency in the background and other widgets to be visible/opaque.
Here is an image example (in windows and mac):