added event handler for the color changed event