Unity 3d - change color - get current gameObject and change its color
image - see https://www.youtube.com/watch?v=_RIsfVOqTaE
using UnityEngine.UI;
..
public Image img;
...
img.color = Color.red; //
object - see https://learn.unity.com/tutorial/scripts-as-behaviour-components#
GetComponent<Renderer>().material.color = Color.red;