It is not possible with out of the box functionality. A couple of possible solutions:
1. Use a radio button with state definitions. You can define specific colors for specific states, and write the states wit your service outputs.
2. Create a custom widget/modify the existing button widget to feed style definition as an input. Remember to copy the original widget data in case you need to revert. Attached is documentation on custom extensibility.