Change Text Label Background after counter deployed

Is there a way to change a “text labels” color or background color after it is deployed on to the map?

I am seeking a way to change this mid game.

I’m pretty skeptical that this is possible, as Text Label traits cannot have their color properties modified at run-time, nor do they have an ability to be deactivated by a keystroke (otherwise with a Trigger you could turn the initial one off and activate a second Text Label that is identical to the first except for background color).

Joel is on the right lines to suggest using a text label for each color.

You can effect activation / deactivation using a calculation forces a null text string into one of the text labels (turning that color off) whilst letting the text value be valid in the other label.

For example if TextColor is a property that you set to control the Text Label activation, the following expressions could be used in two different Text Labels to allow color switching:

{ TextColor==1 ? “This label displays when TextColor is set to 1” : “” }

and in the other Text Label, same field :-

{TextColor==1 ? “” : “This label displays when TextColor is not set to 1” }

Using padding in your label text (e.g. html width/text justification or   and line breaks) you can create the illusion of a fixed background label on which your text is displayed.

Examples of this technique are in the following prototypes in my experimental version of the C&C Napoleonics module, here:
Army Heading - Dynamic Text
and
Combat Assist (the two “Dice to Roll…” text labels and Calculated Property DiceToRoll)

Mark

I can confirm that Mark’s suggestion works, as I came up with the same idea for the module I’m currently working on.