11.5. Changing Step 5: Increasing and decreasing color values

Below is a selection of images that you can use in the programs in this section.

beach.jpgbaby.jpgvangogh.jpgswan.jpg
puppy.jpgkitten.jpggirl.jpgmotorcycle.jpg
gal1.jpgguy1.jpggal2.jpg

First example: Let’s change STEP 5, so that we decrease the red by 50%.

Try the program above on some of the other images by changing the name of the image file on line 5. What effect does it always have? Is this what you expected when we decrease the red?

We can increase the red in a similar way. Let’s change STEP 5, so that we increase the red by 150%.

Try the program above on some of the other images by changing the name of the image file on line 5. What effect does it always have? Is this what you expected when you increase the red? What happens if you increase two colors at the same time?

Another way to get a similar effect to increasing the red, is to decrease the green and blue. Figure out how to do that in the program above and then use that information to drag the code blocks below from the left to the right in the correct order with the correct indention.

Decrease the red by .5 and increase the blue and green by .5 in puppy.jpg.

Show Comments

Note

Discuss topics in this section with classmates.

Show Comments
You have attempted of activities on this page