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

color_moresaturation.py

import coloreffect, inkex

00003 class C(coloreffect.ColorEffect):
  def colmod(self,r,g,b):
    hsl = self.rgb_to_hsl(r/255.0, g/255.0, b/255.0)
    #inkex.debug("hsl: " + str(hsl[0]) + ", " + str(hsl[1]) + ", " + str(hsl[2]))
    hsl[1] = hsl[1] + 0.05
    if hsl[1] > 1.0:
        hsl[1] = 1.0
    rgb = self.hsl_to_rgb(hsl[0], hsl[1], hsl[2])
    return '%02x%02x%02x' % (rgb[0]*255, rgb[1]*255, rgb[2]*255)

c = C()
c.affect()

Generated by  Doxygen 1.6.0   Back to index