Refactor animated palette