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 Change Pen () by () (block).
Change Pen Color by ()
change pen color by ()::pen
Category Pen
Type Stack
Removed in 3.0

The Change Pen Color by () block was a Pen block and a stack block. The block changed the pen's color by the specified value. There were 200 different possible colors. In Scratch 3.0, this block was replaced by Change Pen () by ().

Example Uses

In projects that use the pen, the pen must have a certain color — this block can change it.

Some common uses for the Change Pen Color by () block were:

  • Iterating through pen color values while the sprite is moved to create colorful art
forever
    if <((timer) mod (1)) = [0]> then
        change pen color by (1)
    end
end
  • Varying pen colors for an art program
forever
    change pen color by (loudness)
    wait (2) secs
end
  • In projects that "draw" objects with the pen, changing the color of the object(s)
repeat (360)
    move (1) steps
    turn cw (1) degrees
    change pen color by ((2) / (3.6))
end

Workaround

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

change pen (color v) by ((color)/(2)) // The color needed.

See Also

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