title: How to make a tkinter canvas background transparent?
body: <p>I am making a chess program and I want to be able to drag the pieces. In order to do this, I put the image of the piece on a <code>Canvas</code> so it can be dragged (I can also use a <code>Label</code> if I want). However, when I drag the piece there is a white square that surrounds the image of the piece.</p>
  
  <p><a href="https://i.stack.imgur.com/zLrew.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zLrew.png" alt="enter image description here"></a> </p>
  
  <p>When I researched the problem, many people gave this solution:</p>
  
  <pre><code>drag_canvas = Canvas(self, height=80, width=80, bg="yellow")
  root.wm_attributes("-transparentcolor", "yellow")
  </code></pre>
  
  <p>This caused the background to be transparent but it was not the chessboard that was visible, it was the program behind the GUI</p>
  
  <p><a href="https://i.stack.imgur.com/6xHrU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6xHrU.png" alt="enter image description here"></a>.</p>
  
  <p>Is there any way I can have the background be transparent and show the chessboard behind rather than the program behind the tkinter window?</p>
  
  <p>Note: I do not mind using any other widget (e.g. a <code>Label</code>) but they must use modules that come default with Python (so no PIL) as this program needs to be used in an environment where I cannot download other modules.</p>