how can I assign a numeric value instead of a string to specify the color of my button ? What the exact syntax ?
 button = tk.Button(itemFrame, text="", b开发者_JAVA技巧g="red", width=10, command=callback)
i.e  bg = #FF0000
thanks
There are two general ways to specify colors in Tkinter.
- You can use a string specifying the proportion of red, green, and blue in hexadecimal digits.
- You can also use any locally defined standard color name
#rgb Four bits per color
#rrggbb Eight bits per color
#rrrgggbbb Twelve bits per color
The format should be string
bg='#FF0000'
and not bg=#FF0000
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论