Changes the tint of a sprite or group of sprites to the selected color.
Sprites can be customized by changing their tint, or color. Color can be used in a variety of ways, such as to add color to a project or indicate when an event occurs.
Examples
Example 1
The color of a sprite can be changed several times in a project.
Example 2
Change color can be used to make sprites wearing the same costume look unique and more colorful.
Syntax
setTint
Parameters
Name | Type | Required? | Description |
---|---|---|---|
color | The color to be changed to | ||
sprite | The sprite or sprite group whose color is being changed |
Tips
- Changing the color will add a tint to the existing sprite. Therefore, the color may overlap and mix with the sprite’s existing color.
- To create multiple sprites with the same costume but different colors, use the named sprite block and individually change their colors.
Found a bug in the documentation? Let us know at support@code.org.