unity ui image color not changing code example
Example: how to change image color unity
using UnityEngine.UI;
public GameObject YourgameObjectWithImage;
YourgameObjectWithImage.GetComponent<Image>().color = new Color32(255, 255, 225, 225);
using UnityEngine.UI;
public GameObject YourgameObjectWithImage;
YourgameObjectWithImage.GetComponent<Image>().color = new Color32(255, 255, 225, 225);