0102 - Arithmetic and Color: Shifting and Scaling

Request a canvas of size 300x300 pixels. Declare three float variables: R,G,B. Assign these variables to have values which would produce a nice color of medium brightness.

Use R,G,B to govern the color of a rectangle on the canvas. In other words, incorporate R,G, and B into the syntactic slots for a fill() command, and draw a rectangle with that color. Now draw the following additional rectangles:

Experiment with different multiplicative factors, and different additive factors. In comments in your code, describe the visual effect of multiplication and addition on a variable used to govern color.

Solutions