Scripts: capcolor.py
| File capcolor.py, 377 bytes (added by , 16 years ago) |
|---|
| Line | |
|---|---|
| 1 | # |
| 2 | # Syntax: runscript capcolor.py lightblue |
| 3 | # |
| 4 | # where argument can be a color name or red,green,blue,opacity |
| 5 | # numeric values in range 0 to 1, e.g. 0,1,0,1 for opaque green. |
| 6 | # |
| 7 | import Commands |
| 8 | color = Commands.convertColor(arguments[0]) |
| 9 | rgba = None if color is None else color.rgba() |
| 10 | from SurfaceCap import surfcaps |
| 11 | c = surfcaps.capper() |
| 12 | c.set_cap_color(rgba) |
| 13 | c.show_caps() |
![[Chimera Issue Tracking System]](/trac/chimera/chrome/site/chimera_logo.png)