How to create a flashing label (background color)?

Hi,

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?

Thanks

You could make a Javascript extension (https://vaadin.com/wiki/-/wiki/Main/Integrating+a+JavaScript+library+as+an+extension) and use JQuery to transition between the colors:
http://stackoverflow.com/questions/190560/jquery-animate-backgroundcolor

or maybe
http://www.w3schools.com/css/css3_animations.asp