Next: display
Up: Tcl Text Commands
Previous: color
  Contents
  Index
colorinfo
(Tcl) This command provides access to the color definitions. For information on
the color properties see the chapter on
Coloring.
- colorinfo categories:
returns a list of available categories
- colorinfo category category:
returns a list of names for the given category
- colorinfo num:
returns the number of base solid colors (17)
- colorinfo max:
returns the total number of colors available (49)
- colorinfo colors:
returns a list of the named solid colors
- colorinfo [ index | rgb ] <
name | value > :
returns the index or rgb of the given name or color id.
- colorinfo scale < method | methods |
midpoint | min | max >:
returns the information about the color scales
Examples:
# find out what color corresponds to which id:
set i 0
foreach color [colorinfo colors] {
puts "$i $color"
incr i
}
# also get a list of RGB values
set i 0
foreach color [colorinfo colors] {
lassign [colorinfo rgb $color] r g b
puts "$i $color \{$r $g $b\}"
incr i
}
vmd@ks.uiuc.edu