Generating Colors

Colors are indicated by strings. Most normal colors such as 'red', 'purple', 'green', 'cyan', etc. should be available. Many colors come in various shades, such as 'red1', 'red2','red3', 'red4', which are increasingly darker shades of red.

The graphics module also provides a function for mixing your own colors numerically. The function color_rgb(red, green, blue) or color_rgb([red, green, blue]) will return a string representing a color that is a mixture of the intensities of red, green and blue specified. The red, green and blue components should be ints in the range 0-255. Thus:



John Zelle 2010-08-29