How to create a flashing label (background color)?


I have some labels that display numbers. They are updated periodically.
Now I’d like their color to change/flash based on if the new number is higher or lower compared to the previous one.

Is there already a component or addon that supports this feature?
If not, how could I implement it? For sure I somehow have to call label.setCss(“red”); or similar.
But how can I get transitions/fading colors from transparent>red>transparent? Would I have to create a number of sub-red css classes that I have to apply while a timer runs and constantly changes the background color?

Do you have any good suggestions on this?


You could make a Javascript extension ( and use JQuery to transition between the colors:

or maybe