# 20.5.2.11 Invert

The imgInvert function inverts the color of each pixel. For example, if we invert a pixel with the original color of (r, g, b), its color will become ( $2^{bit}-1-r$ , $2^{bit}-1-g$ , $2^{bit}-1-b$ ), where bits is the number of bits per pixel. To use this function,