Hex variable and color
Posted: Mon Jan 08, 2018 5:53 am
Hey all. Another annoying question here.
Im trying to set the color of some text based on the value of a variable but the various permutations of this that i have tried throw exceptions
basically i want to set a variable elsewhere in the code which will allow me to use text color flag i.e
$ textColorVar = "#ffaa00"
text "{color = textColorVar} Text n stuff {/color}"
for clarity i have already tried the above and it doesn't work. it says that color string must be 3,4, 6 or 8 characters long
Im trying to set the color of some text based on the value of a variable but the various permutations of this that i have tried throw exceptions
basically i want to set a variable elsewhere in the code which will allow me to use text color flag i.e
$ textColorVar = "#ffaa00"
text "{color = textColorVar} Text n stuff {/color}"
for clarity i have already tried the above and it doesn't work. it says that color string must be 3,4, 6 or 8 characters long