fixed pixel to color method for Grayscale palette