implementing palette view and its persistence