Archive.png This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective. For information on the feature that replaced this one, see Set Pen () to () (block).
Set Pen Color to ()
set pen color to ()
Category Pen
Type Stack
Removed in 3.0

The Set Pen Color to () block is a Pen block and stack block. The block sets the pen's color to the hue chosen with the argument. A 200 pen color value is the same color as a 0 pen color value; in other words, if you change the pen color by 200, the color still looks the same. In Scratch 3.0, this block was replaced by Set Pen () to ().

All of the possible colors accessible with the Set Pen Color to () block (without changing the shade.)

Example Uses

As this block can change the pen's color, it is mainly used when the pen is drawing something and a different color is desired.

Some common uses for the Set Pen Color to () block are:

  • Choosing the chosen color in paint projects
set pen color to (13)
repeat until <not <mouse down?>>
    go to [mouse-pointer v]
  • Choosing a random color
set pen color to (pick random (0) to (200))

Infinite Color

In Scratch 2.0, setting the pen color to Infinity would cause the color to become black. This was a quick and easy way to change the pen color to black without using the set pen color to [#000000] block.


This block's effect can still be accessed with the following workaround:

set pen (color v) to ((color)/(2)) // The color needed.

See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.