不确定你到底在找什么,但这会有用吗?

import Tkinter
mycolor = '#%02x%02x%02x' % (64, 204, 208) # set your favourite rgb color
mycolor2 = '#40E0D0' # or use hex if you prefer
root = Tkinter.Tk()
root.configure(bg=mycolor)
Tkinter.Button(root, text="Press me!", bg=mycolor, fg='black',
activebackground='black', activeforeground=mycolor2).pack()
root.mainloop()

如果您只想查找窗口的当前值,并设置窗口小部件以使用它,cget可能就是您想要的:

import Tkinter
root = Tkinter.Tk()
defaultbg = root.cget('bg')
Tkinter.Button(root,text="Press me!", bg=defaultbg).pack()
root.mainloop()

如果要为新窗口小部件设置默认背景颜色,可以使用tk_setPalette(self,* args,** kw)方法:

root.tk_setPalette(background='#40E0D0', foreground='black',
activeBackground='black', activeForeground=mycolor2)
Tkinter.Button(root, text="Press me!").pack()

然后,默认情况下,您的窗口小部件将具有此背景颜色,而无需在窗口小部件参数中设置它.内联帮助功能导入Tkinter提供了许多有用的信息;帮助(Tkinter.Tk)