def invert_colors(clip):
 maxi = (1.0 if clip.ismask else 255)
 return clip.fl_image((lambda f: (maxi - f)))

def invert_colors ( clip ) : maxi = ( 1.0 if clip . ismask else 255 ) return clip . fl_image ( ( lambda f : ( maxi - f ) ) )
returns the color-inversed clip .