Using Palette Indexes As Color Values

Methods and properties that take an OLE_COLOR data type can also reference a particular index in the current bitmap's palette. This can be useful in cases where a color is used for transparency and the palette may contain the same color in more than one palette position.

When specifying a palette index as a color value, use the following formula:

16777216 + index

When evaluating a palette index, you can use the following logic:

if value >= 16777216 then
index = value - 16777216