NEW Explore the Scratch Block Dictionary, tutorials, textbook, and classroom guides

Start learning →

set pen color to (#) — Scratch Block Guide

📌 What you will learn

Sets the exact pen stroke color using a color picker.

What this block does

Sets the exact pen stroke color using a color picker.

Color-code shapes, HP bars (green/yellow/red), or palette buttons in a paint app.

  • Category: Extensions
  • Key tip: Pair with color palette buttons so users can pick their favorite brush color.

Working Scratch example

Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it.

Example using set pen color to (#)
  1. When green flag clicked
  2. Set pen color to blue
  3. Set pen size to 5

Try it: Draws bold blue lines.

Related block guides

Explore other blocks in the same category or return to the full English Block Dictionary.

Back to Extensions See the overview and patterns for Extensions. Learn more → Scratch Block Dictionary (All Categories) Browse Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and Extensions. Learn more →

FAQ

When should I use "set pen color to (#)" in Scratch?

Color-code shapes, HP bars (green/yellow/red), or palette buttons in a paint app. Pair with color palette buttons so users can pick their favorite brush color.

This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.