Code

Translations. French translation minor update.
[inkscape.git] / share / extensions / color_morelight.py
1 #!/usr/bin/env python
2 import coloreffect, inkex
4 class C(coloreffect.ColorEffect):
5   def colmod(self,r,g,b):
6     hsl = self.rgb_to_hsl(r/255.0, g/255.0, b/255.0)
7     #inkex.debug("hsl: " + str(hsl[0]) + ", " + str(hsl[1]) + ", " + str(hsl[2]))
8     hsl[2] = hsl[2] + 0.05
9     if hsl[2] > 1.0:
10         hsl[2] = 1.0
11     rgb = self.hsl_to_rgb(hsl[0], hsl[1], hsl[2])
12     return '%02x%02x%02x' % (rgb[0]*255, rgb[1]*255, rgb[2]*255)
14 c = C()
15 c.affect()