5 if sys.version_info[0] == 2:
11 from tkFileDialog
import askopenfilename
12 from tkFileDialog
import asksaveasfilename
13 from tkSimpleDialog
import askstring
14 from tkMessageBox
import *
15 from tkColorChooser
import askcolor
16 if sys.version_info[0] == 3:
18 import urllib.request, urllib.error, urllib.parse
22 from tkinter.filedialog
import askopenfilename
23 from tkinter.filedialog
import asksaveasfilename
24 from tkinter.simpledialog
import askstring
27 from tkinter.colorchooser
import askcolor
33 tempwindow.state(
"withdrawn")
34 rgb,hexcolor =
askcolor(parent=tempwindow, title=
"choose color for "+text)
36 print(
"you picked the following color for "+str(text)+
": "+str(hexcolor))
46 button = Button(root, text =
"Select color",
47 command = choose_color)
49 root.geometry(
"300x300")