Code

updated spanish.nsh and inkscape.nsi to reflect latest file-changes
[inkscape.git] / trunk / share / extensions / color_lesssaturation.py
1 import coloreffect, inkex
3 class C(coloreffect.ColorEffect):
4   def colmod(self,r,g,b):
5     hsl = self.rgb_to_hsl(r/255.0, g/255.0, b/255.0)
6     #inkex.debug("hsl: " + str(hsl[0]) + ", " + str(hsl[1]) + ", " + str(hsl[2]))
7     hsl[1] = hsl[1] - 0.05
8     if hsl[1] < 0.0:
9         hsl[1] = 0.0
10     rgb = self.hsl_to_rgb(hsl[0], hsl[1], hsl[2])
11     return '%02x%02x%02x' % (rgb[0]*255, rgb[1]*255, rgb[2]*255)
13 c = C()
14 c.affect()