color_custom.py revision c72ad7ba6a0ef54fcbd0bd7adba8f6ec25f0688a
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
# add stuff to be accessible from within the custom color function here.
try:
except:
c = C()
c.affect()