When changing the button appearance programmatically, resolve the colours based on the theme, rather than hard-coding the colours.