This is a read-only mirror of pymolwiki.org
Difference between revisions of "Color"
Jump to navigation
Jump to search
m (Changed the API definition) |
(adding technique to use RGB) |
||
Line 9: | Line 9: | ||
===PYMOL API=== | ===PYMOL API=== | ||
<source lang="python">cmd.color( string color, string selection )</source> | <source lang="python">cmd.color( string color, string selection )</source> | ||
+ | |||
+ | ==Using RGB for Color== | ||
+ | If you prefer RGB to color any object | ||
+ | <source lang="python"> | ||
+ | set_color newcolor, [r,g,b] | ||
+ | color newcolor | ||
+ | </source> | ||
===EXAMPLES=== | ===EXAMPLES=== | ||
<source lang="python">color yellow, (name C*)</source> | <source lang="python">color yellow, (name C*)</source> | ||
+ | |||
+ | RGB Example: | ||
+ | <source lang="python"> | ||
+ | set_color khaki, [195,176,145] | ||
+ | color khaki | ||
+ | </source> | ||
[[Category:Objects_and_Selections]] | [[Category:Objects_and_Selections]] | ||
[[Category:Commands|color]] | [[Category:Commands|color]] |
Revision as of 20:55, 13 November 2005
DESCRIPTION
"color" changes the color of an object or an atom selection.
USAGE
color color-name color color-name, object-name color color-name, (selection)
PYMOL API
cmd.color( string color, string selection )
Using RGB for Color
If you prefer RGB to color any object
set_color newcolor, [r,g,b]
color newcolor
EXAMPLES
color yellow, (name C*)
RGB Example:
set_color khaki, [195,176,145]
color khaki