Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!crdgw1!crdgw1.ge.com!barnett From: barnett@crdgw1.crd.ge.com (Bruce G. Barnett) Newsgroups: comp.windows.news Subject: colorframes.ps Message-ID: <258@crdgw1.crd.ge.com> Date: 27 Apr 89 16:07:04 GMT Sender: news@crdgw1.crd.ge.com Reply-To: barnett@crdgw1.ge.com (Bruce G. Barnett) Organization: GE Corp. R & D, Schenectady, NY Lines: 27 Do you get confused with too many windows? Can't keep track of which icon goes with which program? If you have a color system, try this: #!/usr/NeWS/bin/psh % From: Bruce G. Barnett (barnett@crd.ge.com) % Program: colorframes.ps Apr 27, 1989 % This program assigns a random color ONCE to each new window frame and icon. % % Details: % This program will change the variable FrameFillColor to a procedure % that the first time it is used randomly selects a color. making sure % it is not too dark, and stores the color in the instance variables % FrameFillColor and IconFillColor. % LiteWindow begin /FrameFillColor { % change variable to a procedure 3 { random dup .1 le { .3 add } if } repeat % get 3 random values > .1 rgbcolor dup % convert into a rgbcolor, make two copies /FrameFillColor 1 index def % save 1 into instance var FrameFillColor /IconFillColor 1 index def % save other into instance var IconFillColor } def end -- Bruce G. Barnett a.k.a. uunet!steinmetz!barnett,