fixed pixel to color method for non-RGB palette