Tkinter colours lighter on OS X

Patrick Robertson <[email protected]>
Newsgroups gmane.comp.python.tkinter
Message-ID <[email protected]>
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
[email protected]
https://mail.python.org/mailman/listinfo/tkinter-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.