how to change background colour of variant pills and add to cart

Hi many thanks for your quick reply.

It works perfectly for the Add to cart, many thanks!

Sadly it doesn’t seem to work for the variant pills though. Any other ideas please? many thanks!