How to use change colors behind a picture?

I know how to make a transparency in gimp, but I looked at the inverted mouse pointer in windows and wondered. It's not a transparency; it take the colors behind it and inverts them. Does anyone know a way to do this in gimp?

<Image>/Colors/Invert.

<Image>/Colors/Invert.