Inverting values
Sometimes, it's faster to invert a mask or RGB tones rather than recreating a new one. Though there is an Invert node to do this, it's worth understanding how the same effect can be obtained using a different node. This can enhance the perception on node utilizations, as shown in the following screenshot:
The previous screenshot explains multiple ways to invert an image. Using the F key on the ColorRamp node to invert the black and white handles, subtracting the input from 1 using a Math node, and reversing the default curve in RGB curves node will result in inverting the input image.