Changing Pen Shade

In addition to selecting color, Scratch also allows you to select the level of shading applied when drawing. The range of values supported by the pen shade is 1 to 100, as demonstrated in Figure 12.6.

Figure 12.6. Shading affects the application of light to a color.


By default, Scratch applies a shading value of 50 when drawing colors. A shade value of 0 results in a black color. A shade value of 100 results in white. Scratch lets you specify the level of shading to be applied when drawing using either of the pen code blocks shown in Figure 12.7.

Figure 12.7. You can change the value used to apply shading by varying its current value or by setting an entirely new value.


As an example of how to work with the first code block shown in Figure 12.7, let’s modify the drawing example again as shown here.

Here, the shading level has been increased by a value of 10. Rather than change the shading level relative to its current value, you can use the second code block shown in Figure 12.7 to specify a shade level, as demonstrated in the following script:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.196.111