-
Book Overview & Buying
-
Table Of Contents
Python 2.6 Graphics Cookbook
By :
Tkinter has its own color chooser tool that is remarkably simple to use.
Four lines of code gets you a tool of elegance and usefulness.
Copy, save, and run this example as you have done with previous programs. The following screenshot shows the Tkinter's color picker (MS windows XP).

The following screenshot shows the Tkinter's color picker (Linux – Ubuntu 9.10).

# color_picker_1 .py #>>>>>>>>>>>>>>> from Tkinter import * from tkColorChooser import askcolor askcolor() mainloop()
This tool is so remarkably easy to use you will ask why we have bothered with the more cumbersome versions shown in the numerical color mixing-matching palette example. There are two reasons. Firstly we can see how to manipulate color inside python code. And secondly, the independent swatch window that you can move around on top of pictures can be useful.
The subject of color mixing, nomenclature...
Change the font size
Change margin width
Change background colour