The palette that you supply is an array of RasterColor structure. The RasterColor structure has four one-byte fields as follows:
B
ColorResolution maps the image's pixel values to the palette entries that are not reserved.