set pen color to (#) — Scratch Block Guide
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.
- When green flag clicked
- Set pen color to blue
- 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.
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.