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. For a full list, look up X11 color names on the web.

The graphics module also provides a function for mixing your own colors numerically. The function 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. These should be ints in the range 0-255. Thus color_rgb(255, 0, 0) is a bright red, while color_rgb(130, 0, 130) is a medium magenta.

Example: aCircle.setFill(color_rgb(130, 0, 130))

zelle 2016-08-26