It's probably expecting the 3 components Red, Green and Blue enconded inside an UINT (Delphi's Longword type), not the palette index as you seem to be passing from your example "(for ex. 255)". The reason it's working with index 0 might be because the palette has black color in the first index of the palette, so you think it's refering to that index, but the function is decoding the 0 ($00000000) as Red:0, Green:0, Blue:0, so it's just a coincidence Smile
thanks for your reply, I was fears that; of course is impossible always use the RGB, because, in 8bit bitmap, sometime the same color is used in two different index (0 and 31 for ex.), so if I make transparent the RGB color and not the index, I make transparent also the other color that must be solid.
I must make transparent only the index, not the RGB.

However, I've tried the function using the RGB of the color... but seem not working, work only with color 0, that's very strange. If I've time I'll make some example program.

I found a nice application with source that should help you:
http://www.efg2.com/Lab/Graphics/Colors/PaletteLab.htm
I know that site, it was my first reference