color_darker.py 275 Bytes
Newer Older
Leo Jackson's avatar
Leo Jackson committed
1
#!/usr/bin/env python
2 3 4 5
import coloreffect

class C(coloreffect.ColorEffect):
  def colmod(self,r,g,b):
Dmitry Kirsanov's avatar
Dmitry Kirsanov committed
6
    FACTOR=0.9
7 8 9 10 11 12 13
    r=int(round(max(r*FACTOR,0)))
    g=int(round(max(g*FACTOR,0)))
    b=int(round(max(b*FACTOR,0)))
    return '%02x%02x%02x' % (r,g,b)

c = C()
c.affect()