color_custom.py revision b97c841ca6aa0a4f8ff56e7760e85b2d57d95b15
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
#coloreffect.debug('I: %f %f %f' % (r,g,b))
#coloreffect.debug('E: %f %f %f' % (r,g,b))
#coloreffect.debug('N: %f %f %f' % (r,g,b))
c = C()
c.affect()