To change the color of a line that is created using the pen down block, use the Set Color block.
- Click on the Actions toolkit
- Scroll down to the Drawing section
- Drag the Set Color block into the editor
sprite.set_color("red")