Changing the button color when activated

I have been trying to make this simple nightshift button to change color when I toggle it on on the touchbar. All my buttons are white with black backgrounds and when toggled on, I want nightshift button to turn orange. How can I do this? I have no experience in scripts but I can try :slight_smile: Thanks!

This is the screenshot of the script from APT by @yuuiko.

It turns out that that script doesn't read the system state, I'm looking to find a more accurate method though have no idea how right now. It does work tho, ish