I am trying to get a UI button pressed property to activate when an input button is pressed,

Hi, I am trying to get a UI button pressed property to activate when an input button is pressed, and I have the invoke command down and it works, how can I achieve the pressed color property in the same way?

I tried this, and the invoke part works, but the pressed color will not show.

if (note.noteNumber == 60)
                {

                    A1Button.onClick.Invoke();
                    A1Button.interactable.HasProperty("Pressed");
                }

So I got it to work with this:

A1Button.onClick.Invoke();
ExecuteEvents.Execute(A1Button.gameObject, new PointerEventData(EventSystem.current), ExecuteEvents.submitHandler);