refactoring of palette gradient methods.