Setting the color of a button

I simply want to change the color of a button with a line of code. .background doesnt do anything, because i guess the button fully covers the background. Setting first .alpha and then .background doesnt do anything either. I was thinking of using valueAction. This is good because i can just set .states to certain colors and evaluating valueAction will set the index of this array to display. But a problem is that valueAction also evaluates the action function, which is the function that gets triggered up on clicking the button. But i dont want that to happen, i just want the color to change.

So is there any way to just set the color of the button?

ok quick fix, shoulve gone through the documentation a little bit more thorough. I can just use .value for this.

Indeed, value is better here.

Perhaps a personal opinion, but I think the use of valueAction should be discouraged. Maybe documentation needs to be more explicit about that.

hjh