I'd like to set the colors of my text and background according to the values of variables. Unfortunately, I can't figure out how to evaluate a variable inside custom style markup. The following code should illustrate what I am trying to do:
@
How can I achieve this?
Comments
Make a widget as follows: and call it like so: Hexadecimal strings of the format "#FF00FF" work just fine too.
Since you're actually setting CSS color properties, any valid CSS color value will work: color keywords, RGB hex triplet (i.e. #RGB or #RRGGBB), or the functional notations (i.e. rgb(), rgba(), hsl(), hsla()).