We talked about how to generate colors by specifying their
RGB values, and then demonstrated this by looking at two improved versions
of the Scribbler program from lecture 2. To understand the following
examples we also needed to understand the RandomIntGenerator class.
A version of the scribbler program that draws in four
different colors:
Color4Scribbler.
A fancier version of the scribbler program that generates a
random color by selecting the red, green, and blue components at
random.
Click on ScribbleColor to show the
example.