Changing button color based on state