1definvert_colors(clip):
2""" Returns the color-inversed clip.
34 The values of all pixels are replaced with (255-v) or (1-v) for masks
5 Black becomes white, green becomes purple, etc.
6 """7maxi = (1.0ifclip.ismaskelse255)
8returnclip.fl_image(lambdaf : maxi - f)
9