Phaser API Documentation

  Version: 
Only webGL setTint([color])

Description:

Sets an additive tint on this Game Object.

The tint works by taking the pixel color values from the Game Objects texture, and then multiplying it by the color value of the tint.

To modify the tint color once set, either call this method again with new values or use the tint property.

To remove a tint call clearTint, or call this method with no parameters.

To swap this from being an additive tint to a fill based tint set the property tintFill to true.

Parameters:

name type arguments Default description
color number <optional> 0xffffff

The tint being applied to the entire Game Object.

Returns:
Description:

This Game Object instance.

Since: 3.60.0