The Color Clearer plugin makes pixels that match the selected color transparent, and modifies the transparency and color of the other pixels to maximize their transparency while still producing the original color when blended with the normal blending mode to a background set to the selected color. It some sense, it removes as much of the selected color as possible from each pixel.
Here is the (still simple) user interface:
The Make Transparent Pixels Transparent White check box specifies that transparent pixels will be set to transparent white, rather than have their colors remain unchanged.
I was careful to try to make the blended image after Color Clearer exactly match the original blended image, even when the original pixels are partially transparent. I hope I succeeded. Interestingly (I think), all the math is done using integer arithmetic. I attempted to do the same thing in HSV Eraser, but I didn't take into account the precise way PDN alpha-blends layers, so there were many cases where the resultant blended pixels were off by one.
Here's an example, using an image from a previous discussion.
The original image is:
After using the Color Picker to choose the red background color, then running Color Clearer, the result is:
If the second image is placed on top of a layer filled with the background color, the merged layers match the original image.
Here is the DLL: ColorClearer.zip
Maximilian has a 3.5.11 version.
Here is the CodeLab code:
EDIT: As noted next to the DLL, I intend to modify the plugin to choose better replacement colors. The current values work, in that the produce the proper colors when blended with the background color, but they are sometimes somewhat illogical choices.
EDIT 2: A new version. I changed the color used when a number of colors will produce the correct blended result. I now choose the color that's nearest to the original color. For consistency, I left completely transparent pixels unchanged (except for alpha), unless an option is selected to make them transparent white.