/[gzz]/gzz/gfx/libpaper/colors.py
ViewVC logotype

Diff of /gzz/gfx/libpaper/colors.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by jvk, Sun Mar 2 17:11:14 2003 UTC revision 1.21 by jvk, Mon Mar 3 14:09:54 2003 UTC
# Line 39  class Colors: Line 39  class Colors:
39          return " ".join([str(a) for a in arg])          return " ".join([str(a) for a in arg])
40      def __init__(self, seed,      def __init__(self, seed,
41                   colors = 8,                   colors = 8,
42                   minlum = 80):                   minlum = 80,
43                     blend = 0):
44          rnd = self.rnd = java.util.Random(seed)          rnd = self.rnd = java.util.Random(seed)
45    
46          huerange = rnd.nextGaussian() * 90          huerange = rnd.nextGaussian() * 90
# Line 89  class Colors: Line 90  class Colors:
90          col = [clampSat(YSTtoRGB(c)) for c in yst]          col = [clampSat(YSTtoRGB(c)) for c in yst]
91          shuffle(col, rnd.nextDouble)          shuffle(col, rnd.nextDouble)
92    
93          #col = [ [.5 + .5*c for c in cc] for cc in col]          if blend > 0:
94                col = [ [blend * 1 + (1 - blend) * c for c in cc] for cc in col]
95                                    
96                    
97          if dbg:          if dbg:

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26