Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

color_desaturate.py

import coloreffect

00003 class C(coloreffect.ColorEffect):
  def colmod(self,r,g,b):
    l = (max(r,g,b)+min(r,g,b))/2
    ig=int(round(l))
    return '%02x%02x%02x' % (ig,ig,ig)

c = C()
c.affect()

Generated by  Doxygen 1.6.0   Back to index