1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > Python 颜色选择器

Python 颜色选择器

时间:2021-06-11 06:29:53

相关推荐

Python 颜色选择器

#coding=utf-8#颜色选择器from tkinter import *import tkinter.colorchooser as cc #给导入的包指定一个别名class App:def __init__(self,master):frame=Frame(master)frame.pack()button=Button(frame,text='选择颜色',command=self.ask_color)button.grid(row=0,column=0)def ask_color(self):(rgb,hx)=cc.askcolor() #************print('rgb='+str(rgb)+' hx='+hx)root=Tk()app=App(root)root.mainloop()

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。