Skip to content

Instantly share code, notes, and snippets.

@T31337
Last active August 31, 2023 03:57
Show Gist options
  • Save T31337/a47e641c679f431c1121 to your computer and use it in GitHub Desktop.
Save T31337/a47e641c679f431c1121 to your computer and use it in GitHub Desktop.
ColorPicker
#Simple Color Chooser GUI That Returns Hex And RGB Values :)
from tkinter import colorchooser,Label,Button,Tk
def mColor():
mycolor = colorchooser.askcolor()
mylbl = Label(gui,text=mycolor)
mylbl.grid(row=1,column=0)
return
gui = Tk()
gui.winfo_rgb(color='#64dd76')
gui.title('')
btn = Button(gui,text='ColorChooser',command=mColor)
btn.grid(row=0,column=0)
gui.resizable(width=False,height=False)
gui.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment