Default window colour Tkinter and hex colour codes
问题 I would like to know the default window colour in Tkinter when you simply create a window: root = Tk() If there is one, it is possible to set widgets to the same colour or use a hex colour code? (using rgb) The colour code I have found for the 'normal' window is: R = 240, G = 240, B = 237 Thanks. 回答1: Not sure exactly what you're looking for, but will this work? import Tkinter mycolor = '#%02x%02x%02x' % (64, 204, 208) # set your favourite rgb color mycolor2 = '#40E0D0' # or use hex if you