title: How to change the foreground or background colour of a selected cell in tkinter treeview?
body: <p>I would like to change the foreground or background colour of a selected cell in tkinter.treeview. How can I do that?</p>
  
  <p>This <a href="https://stackoverflow.com/a/18057449/5722359">link</a> showed the command to change the colour of all cells in  a treeview but I could not get it to work for a single cell. </p>
  
  <pre><code>ttk.Style().configure("Treeview", background="#383838", 
   foreground="white", fieldbackground="red")
  </code></pre>
  
  <p>I had previously written a <a href="https://stackoverflow.com/questions/48268506/select-a-cell-in-tkinter-treeview-and-get-the-cell-data?noredirect=1#comment83523709_48268506">test code</a>. Please use this code to derive your solution/advice. Thanks. </p>
  
  <p>This <a href="https://www.youtube.com/watch?v=fay4-jVUieY" rel="nofollow noreferrer">link</a> showed how tags may be used to change the colour of a row of data, i.e. a selected item, but not a cell.  </p>