unity change color of sprite code example
Example: how to change the color of a sprite in unity
//option 1
GetComponent().color = Color.red
//option 2
sprite.color = new Color (R, G, B, A);
//option 1
GetComponent().color = Color.red
//option 2
sprite.color = new Color (R, G, B, A);