O'Reilly logo

Python 2.6 Graphics Cookbook by Mike Ohlson de Fine

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The numerical color mixing matching palette

We make a widget that allows us to easily mix any proportion of the three primary colors of red, green, and blue. The resulting mixture is displayed on a large swatch of resultant color that can be dragged around the display screen. The swatch is at the edge of the widget with the minimum of intervening colors. We can place the swatch next to any color in a picture that we wish to match and adjust the combined color using handy slider controls that are intuitive to use.

How to do it...

To produce this mixing tool we have made use of Tkinter slider controls two chapters before they are formally introduced. At this stage you should just copy and use the code without knowing the details of how they work knowing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required