Hellois there anyway to generate random color and change a sprite color in run-time ?after some researches I found a way to put effect and change it (and this supported in webGL only)any alternative way to change it ?

Suppose you have a tank in your game, and you want to be able to change the color of the body, the treads, and the turret separately.One way to do this is to create a sprite for the body, a sprite for the treads, and a sprite for the turret, and for each one include color variations. The variations can either be in frames as @Tetriser suggested, or in their own separate animations within the sprite.You can then use the "Pin" behavior to keep all the sprites together.

This approach can be especially handy if you want to allow for a lot of variations, as the number of color combinations is the product (multiplicative total) of the number of color variations in each sprite.

So if the tank has 8 colors for each sprite (body, treads, and turret), then the total number of color arrangements is 8 * 8 * 8, which is 512 combinations. It adds (multiplies) up fast.