Scratch Digital Art
Beginner
40 mins
Teacher/Student led
125 points
What you need:
Chromebook/Laptop/PC or iPad/Tablet

Rainbow Paintbrush

In this lesson, students will learn how to create a rainbow paintbrush using Scratch's pen blocks, colour changing, and mouse movement features. They will create a drawing tool that changes colours as it moves, following their mouse pointer.
Learning Goals Learning Outcomes Teacher Notes Lesson Files

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Introduction

    Welcome to our exciting lesson, Rainbow Paintbrush! In this lesson, we are going to create a fun drawing tool that changes colours as you draw.

    We will use Scratch's pen blocks, colour changing, and mouse movement features. By the end of this lesson, you will have your own rainbow paintbrush that follows your mouse pointer and changes colour as it moves. Let's get started!


    2 - Create a new project

    Open the Scratch website in a new tab and create a new project. Delete the cat sprite from the project.

    scratch.mit.edu


    3 - Add the Ball sprite

    We need to add a sprite that we will use for out pen.

    Add the Ball sprite from the sprite library and give it this code to shrink it smaller.

    when green flag clicked set size to (30) %
    Click on the green flag to run your code and shrink the ball.


    4 - Follow our mouse pointer

    Now, we want our pen (the ball sprite) to follow our mouse pointer. This will allow us to control where we draw on the screen.

    To do this, add the following code to your ball sprite:

    when green flag clicked set size to (30) % forever go to [mouse-pointer v] end
    Click on the green flag to run your code. You should see the ball sprite following your mouse pointer around the screen. This means you're ready to start drawing!


    5 - Add the Pen Extension

    Before we start drawing, we need to add a special group of blocks to our project. These blocks are part of the Pen extension.

    To add this extension, click on the 'Extensions' button at the bottom left of the Scratch interface. A window will pop up with different extensions. Find and click on the 'Pen' extension. You will see that new blocks have been added to your blocks palette under the category 'Pen'.


    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.

    Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu
    ๐Ÿช Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more