add optional grayscale palette lookup