Hello. I wonder do you plan to add formula support to the FontColor option?
I think it would be a very sweet addition.
I'd like to easily change colors in FontColor depending on a variable. It would be much easier than making additional measure(s) just for it.
Last edited by balala on May 22nd, 2021, 6:25 pm, edited 1 time in total.
Reason:Please use <code> tags whenever are posting code snippets. It's the </> button.
mmxiv wrote: ↑May 21st, 2021, 11:34 pm
Hello. I wonder do you plan to add formula support to the FontColor option?
I think it would be a very sweet addition.
I'd like to easily change colors in FontColor depending on a variable. It would be much easier than making additional measure(s) just for it.
This is already possible. You just need to tweak your logic slightly. To use formulas with colors, you simply have a formula for each color (and alpha, if you want).
SilverAzide wrote: ↑May 22nd, 2021, 2:23 am
This is already possible. You just need to tweak your logic slightly. To use formulas with colors, you simply have a formula for each color (and alpha, if you want).
mmxiv wrote: ↑May 21st, 2021, 11:34 pm
Hello. I wonder do you plan to add formula support to the FontColor option?
I think it would be a very sweet addition.
I'd like to easily change colors in FontColor depending on a variable. It would be much easier than making additional measure(s) just for it.
This is not possible (and I suppose it won't be in the futher either), because all formulas (doesn't matter if they are applied on Formula options of Calc measures, on Ifcondition options of any kind of measures or on other type of options) have to be entirely numeric. As such, they can't work with strings. Now a color code is always a string, even if it is composed by three or four numbers. A number can't contain a comma, even less more of them, so a color code is a string, which can't be used in formulas.
The solution is either the one described above by SilverAzide and death.crafter or an additional Measure, which will set the color through !SetOption or !SetVariable bangs (yes, I realized you'd like to avoid adding additional measures, but that's it).