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

A limited palette of named colors

There is a vast list of romantically named colors like cornflower blue, misty rose, or papaya whip. There are about 340 of these named colors that are usable in Python.

Colors get names because people remember them most easily in association with a place and an emotional mood. It is easy to remember evocative names and therefore easier to use them. In this example, we reduce the long list down to 140 by using systematic names and eliminating colors that are very similar.

How to do it...

Execute the program shown in exactly the same way as all the examples in previous chapters. What you should see on your screen is a logically laid out chart of rectangular color swatches. Each will have its callable name on it. These ...

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