I'd like to find the window background color in HEX format. Looking for a solution that works on all platforms... Windows/Linux/Mac... 
The following code print (self.cget('bg')) just prints SystemButtonFace but I'd like to get the actual HEX format. The reason is that I need to use this color as a base to create a new slightly darker color shade.
The winfo_rgb method on all widgets will accept a color name and return the r, g, and b components as integers in the range of 0-65535 (16 bits). You can then convert those to hex using standard python string formatting.
How can I get HEX or RGB color code of the window background color?