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