How to change a buttons color?

im having trouble setting the color of a button I want when the player money is less than the invest cost then I want the button to be gray and the interaction turned off. But when I change the colors the button image completely disappears but the color of the button in the inspector is the same as the one I set in the code, just I cant see it because the Image is gone.

    public Button investButton;
    public ColorBlock investButtonColor;

    void Update()
    {
        if (tap.money >= investCost)
        {
            investButton.colors = investButtonColor;
            investButtonColor.highlightedColor = Color.yellow;
            investButtonColor.normalColor = Color.yellow;
            investButtonColor.pressedColor = Color.yellow;
            

            
        }
        else
        {
            investButton.colors = investButtonColor;
            investButtonColor.highlightedColor = Color.cyan;
            investButtonColor.normalColor = Color.cyan;
            investButtonColor.pressedColor = Color.cyan;

            
        }
    }

perhaps something like :

   investbutton.GetComponent<Image>().color = Color.yellow;

I used this:
public void TaskOnClick1()
{
GameObject buttonclr = GameObject.Find(“Button1”);
buttonclr.GetComponent().color = Color.magenta;
}
You have to find the button with you want to work with, so instead of “Button1” put the name of your button
After that, you have to assign the void to the button

Try using color instead of colorblock