colorlearn.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:learnRGB 作者: cbott 项目源码 文件源码
def __init__(self, master):
        #canvas / colored rectangle dimensions
        self.width =  800
        self.height = 300
        #answer rectangle dimenstions
        self.ans_width = 120
        self.ans_height= 120
        #Actual color of the displayed rectangle (r, g, b)
        self.current_color = (0, 0, 0)

        #just a big font so things are bigger
        self.big_font = tkFont.Font(root=master, family='Helvetica', size=20)

        Frame.__init__(self, master)
        self.grid(sticky=(E, W, S, N))

        master.columnconfigure(0, weight=1)
        master.rowconfigure(0, weight=1)
        self.columnconfigure(0, weight=1)
        self.rowconfigure(0, weight=1)

        self.mode = StringVar() #format for representing colors: INT/HEX
        self.generate()
        self.next_color()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号