[I'm on the road right now; I'll respond to other email in the next day or two, but this one is quick. -Doug]
Belinda, Most of the colors used in Pyro are just Tkinter colors. From the page http://infohost.nmt.edu/tcc/help/pubs/tkinter/colors.html: """ There are two general ways to specify colors in Tkinter. 1. You can use a string specifying the proportion of red, green, and blue in hexadecimal digits: #rgb Four bits per color #rrggbb Eight bits per color #rrrgggbbb Twelve bits per color For example, "#fff" is white, "#000000" is black, "#000fff000" is pure green, and "#00ffff" is pure cyan (green plus blue). 2. You can also use any locally defined standard color name. The colors "white", "black", "red", "green", "blue", "cyan", "yellow", and "magenta" will always be available. Other names may work, depending on your local installation. """ So, depending on your platform, these colors can vary. Also, one other complication: in pysim.py you may have noticed the colorMap and colorCode dictionaries. If you want to use other colors for lights or if you want to see other colors with the camera, then those color names and (r,g,b) values should be added to these data structures. (If someone can find a complete list of Tkinter color names with RGB values, I'll add them to the code). See also the corresponding data structures on the client in pyrobot/robot/symbolic.py... should just be defined once and imported...) Also, the use of the colorMap and colorCode could be fixed to work with the Tkinter '#rgb' hex formats, or with (r,g,b) tuples. (BTW, colorCode is used to compress an "image" description in the simulator.) Hope that helps, -Doug On Wed, March 28, 2007 4:43 pm, belinda thom said: > Hi, > > I'm wondering what menu of colors is available for drawing the > TkPioneer robots in. > > I've looked through pysim.py and found where the .color attribute is > set, in the class SimRobot. > > But from there I'm stumped to infer what colors are available. > > If I was creating a world w/just 3 or 4 robots in it, I could try > things out manually, but if I'd like a maximal list, this wouldn't > work... > > Thanks, > > --b _______________________________________________ Pyro-users mailing list [email protected] http://emergent.brynmawr.edu/mailman/listinfo/pyro-users
