It’s time to set up week two’s coding challenge. You are going to need a little help getting started on this one! We need to set up some colour selection tools in our drawing app. But adding colour selection can be challenging and there are many ways to accomplish this task.
In this video, I go through one way of getting this task started in Hopscotch. The video will broach two new ideas: VARIABLES – or in Hopscotch parlance VALUES and colour number codes….
Variables or values are critically important to computer programs. They allow values to be stored temporarily for use later on. I have provided an example below where I compare a mailbox & mail to a variable & information that a computer program might use.
I have provided a couple of other links to help you understand variables and how to create them in Hopscotch as well:
This weeks Challenge:
Your job this week is to create a colour palette for your drawing app in either HOPSCOTCH or SCRATCH. You will need some support getting this started. Here’s a video to help with this…
The following image shows how Hopscotch indexes it’s colour palette. This will help you reference colours by number in the drawing program:
For the Scratch coders among us, I have provided some resources as well. The little Scratch program below will help the people using Scratch determine the colour “code” or number to assign to the set pen colour to code block.
I am also going to show you three ways you might tackle “passing” the colour to the paint brush. One of them uses an external device called a PICO board! We’ll cover setting and sending or “passing” variables too! Once you have viewed the, getting started tutorial, your challenge will be to create a colour palette for your drawing app that contains at least 6 colours as well as black and white.** You might want to add a clear button and a size slider of some sort as well. Get creative in terms of your colour set up.
Have fun and contact me if you need help.