TopMore Conditionals Colors and Random Numbers

Colors and Random Numbers

  1. 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.

  2. A version of the scribbler program that draws in four different colors: Color4Scribbler.

  3. 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.

TopMore Conditionals Colors and Random Numbers