drawPalette() handles zlim of length exceeding 2