I’m having a problem whereby every colour I declare in Tkinter (background
colour, font colour etc.) is always a shade lighter when viewed on OS X.
Take for example the test code:
import Tkinter
root = Tkinter.Tk()
root.configure(bg="#000000")
root.configure(borderwidth=20)
root.geometry('%dx%d+%d+%d' % (200, 200, 200, 200))
frame = Tkinter.Frame(root, bg="#444444", borderwidth=20)
frame.pack(fill=Tkinter.BOTH)
frame2 = Tkinter.Frame(frame, bg="#999999", height=120)
frame2.pack(fill=Tkinter.BOTH)
root.mainloop()
If you run this on OS X and then open up DigitalColor Meter and hover over each
box, you will see that the two lighter grey colours don't match what is in the
code.
If I hover over the the inner square, I get #A9A9A9 (instead of #999999), and
the middle square gives #565656 (instead of #444444).
I also get the same thing for .gifs I load using Tkinter.PhotoImage(data=…).
For images I have tried changing the sRGB/RGB setting of the image to no avail
I'm running OS X 10.9 with Python 2.7.8, Tc/Tk 8.5 (Tkinter specifies
__version__ = '$Revision: 81008 $')
Has anybody else experienced this problem, and if so what is the right fix?
Thanks
You can see the full question on SO:
https://stackoverflow.com/questions/28166029/tkinter-colours-lighter-on-os-x
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss