I have a RGB color in the range of 0.0 to 1.0 for each fragment, I need an algorithm to get the inverse of the color, any ideas how can I do this?
newR = 1.0 - r newG = 1.0 - g newB = 1.0 - b
If the color has a premultiplied Alpha value use the alpha instead of 1.0:
newR = a - r newG = a - g newB = a - b