added color saving for contour