16 bit color only allows 5 bits per color. 5 bits only allows 32 shades per color. So your min and max colors would be 0, 0, 0 (black) and 31, 31, 31 (white).
My guess would be that 31, 0, 31 doesn't equal 255, 0, 255 because its just not the same value (31 is not 255) OR the shade that 31 represents is not exactly equivalent to the shade that 255 represents (could be 255, 254, 253, 252, 251, 250, 249, or 248).
Why black areas (0, 0, 0) would become transparent if the mask color is set to 255, 0, 255 is beyond me.
Whats the work around? I don't know. You could prevent the user from running your application in 16-bit color though.
My guess would be that 31, 0, 31 doesn't equal 255, 0, 255 because its just not the same value (31 is not 255) OR the shade that 31 represents is not exactly equivalent to the shade that 255 represents (could be 255, 254, 253, 252, 251, 250, 249, or 248).
Why black areas (0, 0, 0) would become transparent if the mask color is set to 255, 0, 255 is beyond me.
Whats the work around? I don't know. You could prevent the user from running your application in 16-bit color though.