//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;
private Renderer materialRender;
void Start()
{
materialRender = GetComponent<Renderer>();
materialRender.material.color = new Color(1f, 0f, 1f, 1f); //Color(r, g, b, a)
}