How to make a button unclickable when alpha = 0

This is my code at the moment but it doesn’t work.

using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class UclickableButton : MonoBehaviour {

    public Button button;

    void Update()
    {
        if (Color.alpha = 0)
        {
            button.interactable = false;
        }

        if (Color.alpha = 1)
        {
            button.interactable = true;
        }
    }
}

How can I make it work?

Color.alpha won’t work. You must specify which Color object you are referring.

Color color = GetComponent<UnityEngine.UI.Image>().color;

The syntax to do a comparison is double equals sign. A single equal sign assigns values.

Change

if (Color.alpha = 0)

To

if (color.alpha == 0)
or
if (color.a.Equals(0))