next up previous contents index
Next: debug Up: Core 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.

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