It looks like you have to explicitly tell the canvas to repaint itself.
Create a custom boolean property on your canvas called changeColor:
Add a binding for the custom property to point to a tag that changes:
Change the if statement in your code:
[...snip...]
if event.source.changeColor:
g.setColor(Color.GREEN)
else:
g.setColor(Color.DARK_GRAY)
[...snip...]
And add the following to the propertyChange event of the canvas:
if event.propertyName == "changeColor":
event.source.repaint()