Commit c6283aee by BellCodeEditor

save project

parent a6cf04a1
Showing with 10 additions and 5 deletions
from tkinter import * from tkinter import *
object = Tk() from tkinter import colorchooser
canvas = Canvas(object, width=800,height=500) def colorChoose()
canvas.pack() colorTuple = colorchooser.askcolor
object.mainloop() print('选到的RGB颜色为:',colorTuple[0])
\ No newline at end of file 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