How to change the background color of button

does this not work ? Examples of Colour change button and switch