Let's take a moment to add some color to our drawing by performing the following steps:
In the stack that begins with when (d) key pressed, add a set pen color to () block from the Pen palette below the set pen size to (pen size) block. Enter a value of
15
.Now draw a shape, and you'll see that the shape is in orange color.
Find the set pen shade to () block, and add it after the set pen color to () block. Change the shade value to
25
.Draw the shape again while leaving the color value set to
15
. The color of the shape has now changed based on the shade.Let's iterate through several colors by adding a change pen shade by () block inside the end of the repeat (revs) block. Set its value to
25
.Now draw the shape again, and observe the color change as each pattern gets drawn. Our script looks like the following screenshot: