Can't specify color of tkinter Button

Viewed 32

I know this is a common SO question, but I must be overlooking something very simple:

from tkinter import Tk,Button
root = Tk()  
root.geometry('100x50')  

button = Button(root, bg='blue',text = 'Submit' )
button.pack()

root.mainloop()

The button background simply will not change from default gray. On Mac with Monterey 12.5.1

1 Answers

According to the documentation, color words work if they are also found in the rgb.txt file.

enter image description here

Out of curiosity, do other common colors work? Like red, blue, green?

Related