iterate through the appropriate range of palette entries