popup color palette updates and some code simplification