In perspective I created an enum tag that changes text when a PLC integer tag changes state. So 0 = off, 1 = run, 2 = alarm and so on. Can I also have it change color? I tried stacking "map" transforms but it made a mess. I either had the enum spitting out the actual color hex number x000000 or all of the text stayed black. I don't want to go too crazy on this with a bunch of scripting. I guess I could go old school and stack them on top of each other with visibility settings. Any ideas?
I'm making the assumption that you are displaying the tag value in a label or similar component.
The best practice approach to this is to define enum state colors in your project's Style Classes, and then apply a binding to the display label's textStyle.classes property with a map transform set to return style classes and map accordingly to the values of the integer.
This method provides a single point of truth for all of your enum state colors.