labAuthor.pack() labAuthor.place(relx=0.01, rely=0.01) labChosenColor = Label(text="Selected color", font=("Times New Roman", "28"), bg="#87CEEB") labChosenColor.pack() labChosenColor.place(relx=0.83, rely=0.01) canvas = Canvas(width=780, height=650, bg="#000000", highlightbackground="#00BFFF") canvas.place(relx=0.485, rely=0.075) colorDialog = colorchooser.Chooser(MainWindow) def openColorDialog(): global varR global varG global varB global varX global varY global varZ global varH global varL global varS color = colorDialog.show() varR.set(int(color[0][0])) varG.set(int(color[0][1]))
def setUpClass(cls): AbstractTkTest.setUpClass.__func__(cls) cls.cc = colorchooser.Chooser(initialcolor='dark blue slate')
def choose_color(self): color_dialog = colorchooser.Chooser(self.w_add) self.color = color_dialog.show()