Added color function and data is being saved and reflected at the ui too