title: How can I dynamically change the color of a button in Tkinter?
body: <p>How can I dynamically change the background color of a button in Tkinter ?</p>
  
  <p>It only works when I initialize the button:</p>
  
  <pre><code>self.colorB = tk.Button(self.itemFrame, text="", bg="#234", width=10, command=self.pickColor)
  </code></pre>
  
  <p>I've tried this:</p>
  
  <pre><code>   self.colorB.bg = "#234"
  </code></pre>
  
  <p>but it doesn't work..
  thanks</p>