Code

Following this thread: http://www.nabble.com/Extension-parameters-td9064285.html...
[inkscape.git] / share / extensions / color_darker.py
1 import coloreffect
3 class C(coloreffect.ColorEffect):
4   def colmod(self,r,g,b):
5     FACTOR=0.9
6     r=int(round(max(r*FACTOR,0)))
7     g=int(round(max(g*FACTOR,0)))
8     b=int(round(max(b*FACTOR,0)))
9     return '%02x%02x%02x' % (r,g,b)
11 c = C()
12 c.affect()