VMD-L Mailing List
From: Manuel Melle-Franco (manu_at_ciamserv.ciam.unibo.it)
Date: Tue Jan 20 2004 - 10:20:55 CST
- Next message: John Stone: "Re: How to install VMD on AIX5 OpenGL server"
- Previous message: Dai Ling: "How to install VMD on AIX5 OpenGL server"
- Next in thread: John Stone: "Re: Problems with graphics.color function under VMD's python interpreter"
- Reply: John Stone: "Re: Problems with graphics.color function under VMD's python interpreter"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
---------------------------------------------------------
- Next message: John Stone: "Re: How to install VMD on AIX5 OpenGL server"
- Previous message: Dai Ling: "How to install VMD on AIX5 OpenGL server"
- Next in thread: John Stone: "Re: Problems with graphics.color function under VMD's python interpreter"
- Reply: John Stone: "Re: Problems with graphics.color function under VMD's python interpreter"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]