How to Dynamically change the "Value Format" of ui_text?

Have you tried setting outer quotes (in the template) around {{msg.color}}?
In case you’re not too familiar with attributes in HTML tags and the importance of double quotes, take a look at this response I wrote in another topic here: Material design icons vs font awesome