reverting colors logic