Button colour toggle

Ive been looking all over this site and can only find what Im looking for in some of the bigger presets but I don't want to download the whole thing for one feature. Is anyone able to tell me how to setup a button that either changes colour when toggled, or changes the icon when toggled? Let me know if this isn't even possible. Thanks

I too was looking for a way to do this and I figured out a way after studying a preset I have been using for a while. It's a bit hard to explain via this medium but I will try.

You basically need to create a button which triggers the action you desire plus open a group (you can chain multiple steps in a button!) In this group, you copy the same button as in the top level trigger but you modify its background color so that it gives the illusion that the button is toggling colors when the group opens. The group should be invisible (uncheck the "Enabled/Visible on Touch Bar" check box).

Then, to enable the "untoggle" effect, you have to add actions to the group button to so that both "untoggles" the action and it closes the group when you tap the button, which takes you back to the original button color background.

I know this may sound hard to follow but hopefully this gives you "inspiration" to try to enable this. It took me about 15 minutes of tinkering with a simple app (Reeder) but I am satisfied with how it turned out.

Let me know if I can help further!