color_custom.py revision 23c18b07ba547a13dfb57f9d86f70fe0929b1ca0
import coloreffect
class C(coloreffect.ColorEffect):
self.OptionParser.add_option("--r", action="store", type="string", dest="rFunction", default="r",help="red channel function")
self.OptionParser.add_option("--g", action="store", type="string", dest="gFunction", default="g",help="green channel function")
self.OptionParser.add_option("--b", action="store", type="string", dest="bFunction", default="b",help="blue channel function")
if v<0:
return 0.0
if v>1:
return 1.0
return v
c = C()
c.affect()