From: Manuel Melle-Franco (manu_at_ciamserv.ciam.unibo.it)
Date: Tue Jan 20 2004 - 10:20:55 CST

Hi all,

I am trying to write a python script that will color some primitives as a
function of an user input values using RBG tuples with no much luck.

Setting the color with string (color name) or an integer (color index) works
fine:

>>> from graphics import *
>>> color(0, 'red')
1

but when I try with RBG tuples:

>>> from graphics import *
>>> color(0, (0.0, 0.0, 0.0))
Traceback (most recent call last):
  File "VMD", line 1, in ?
ValueError: Invalid color

        am I doing something wrong?

                thanks,

                        Manu

________________________________________________________
I would believe only in a god who could dance. - Nietzsche -
________________________________________________________

Manuel Melle-Franco, Ph.D.
Dip. di Chimica "G. Ciamician"
Universita Di Bologna
via Selmi 2, I-40126
Bologna, Italy
---------------------------------------------------------
Fax : +39-051-2099456
Phone : +39-051-2099596
---------------------------------------------------------