Commit c6283aee by BellCodeEditor

save project

parent a6cf04a1
Showing with 10 additions and 5 deletions
from tkinter import *
object = Tk()
canvas = Canvas(object, width=800,height=500)
canvas.pack()
object.mainloop()
\ No newline at end of file
from tkinter import colorchooser
def colorChoose()
colorTuple = colorchooser.askcolor
print('选到的RGB颜色为:',colorTuple[0])
print('16进制颜色为:', colorTuple[1])
windows1 = Tk()
button1 = Button(windows1,text='选色',command=colorChooser)
button1.pack()
windows1.mainloop()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment