I want to dither an 8-bit grayscale image to a 4-level one, but I only have predefined color cubes and dither masks for dithering TrueColor to 8-bit indexed color and 8-bit grayscale to 1-bit black-and-white. Is there a simple way to create appropriate parameters for other kinds of dithering?