propertyChange script - change component background on change

I want to make an LED Display change color when the value updates.
I added the following script in the propertyChange event in Component Scripting. It appears to work fine in the Ignition Designer, but it flashes constantly when run as a client.

What am I doing wrong?
Or what is my misunderstanding about how the propertyChange event works?

################################
from threading import Timer

def doLater():
	myItem.background = system.gui.color(255,255,255)
	myItem.glyphForeground = system.gui.color(255,0,0)
	myItem.glyphBackground = system.gui.color(255,255,255)


myItem = event.source
myItem.background = system.gui.color(255,0,0)
myItem.glyphForeground = system.gui.color(255,255,255)
myItem.glyphBackground = system.gui.color(255,0,0)

Timer(0.5,doLater).start()

The propertyChange routine is called for every property that can change. The above produces infinite recursion as soon as you assign to anything is myItem, because you aren’t filtering on event.propertyName. Also, imports and function definitions belong in separate script modules for almost all cases.