You could try to use the set attribute widget.
Modifying the widget to be able to accept a parameter from the context would be needed. You would then use a css selector to find the tab and then set the background-color of the tab based off the parameter that is passed in from the context of the tab. I have not tried this but I would think that it is possible.
An easy way to do this is using the CustomString widget: set 'Render value as HTML' to TRUE, and have a microflow per tabpage. Give your tab a unique name (ed ProductTab, or InvoiceTab) and have the microflow determine what styling the tab should get:
As the items get a class based on their name (.mx-name-TabName) you can target this to apply styling (eg give it a different background color).