Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 操作系统X上的Tkinter颜色更亮_Python_Macos_Python 2.7_Colors_Tkinter - Fatal编程技术网

Python 操作系统X上的Tkinter颜色更亮

Python 操作系统X上的Tkinter颜色更亮,python,macos,python-2.7,colors,tkinter,Python,Macos,Python 2.7,Colors,Tkinter,举个简单的例子: 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) fra

举个简单的例子:

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()
如果您在OSX上运行此操作,然后打开DigitalColor Meter并将鼠标悬停在每个框上,您将看到两个浅灰色与代码中的颜色不匹配。 如果我将鼠标悬停在内部正方形上,我得到
#A9A9A9
(而不是
#999999
),中间的正方形给出
#565656
(而不是
#444444

我正在用Python2.7.8、Tc/Tk 8.5运行OS X 10.9(Tkinter指定
\uuuu version\uuuu='$Revision:81008$'


有没有其他人遇到过这个问题,如果有,正确的解决方法是什么?

FYI-关于这个问题的答案,请参阅我在tkinter python邮件列表上的帖子:

您使用哪种RGB模式显示RGB值?如果我使用sRGB,它将按预期工作。你确定光圈大小是最小值吗?我不太确定你指的是@Rinzler。这不是针对图像,而是针对Tkinter创建的帧。我找不到关于Tkinter sRGB或光圈大小的任何信息