Code

extension printing-marks: the star align test is now useful, using full 4 CMYK colors
[inkscape.git] / share / extensions / color_brighter.py
1 import coloreffect
3 class C(coloreffect.ColorEffect):
4   def colmod(self,r,g,b):
5     FACTOR=0.9
6    
7     i=int(1.0/(1.0-FACTOR))
8     if r==0 and g==0 and b==0:
9       return '%02x%02x%02x' % (i,i,i)
10     if r>0 and r<i:
11       r=i
12     if g>0 and g<i:
13       g=i
14     if b>0 and b<i:
15       b=i;
17     r=min(int(round((r/FACTOR))), 255)
18     g=min(int(round((g/FACTOR))), 255)
19     b=min(int(round((b/FACTOR))), 255)
20    
21     return '%02x%02x%02x' % (r,g,b)
23 c = C()
24 c.affect()