//You can either change material color of an object, or a color of component SpriteRenderer,
//which doesn't really matter unless you have lights added in yout project.
//so lets get a color (blue for this example)
public Color myColor = new Color(0, 0, 1, 1); //(r,g,b,a)
//changing material color looks like this :
gameObject.GetComponent<Renderer>().material.color = myColor;
//changing SpriteRenderer color looks like this :
gameObject.GetComponent<SpriteRenderer>().color = myColor;