next up previous contents index
Next: debug Up: Core Text Commands Previous: color

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
  }

 


Justin Gullingsrud
Tue Apr 6 09:22:39 CDT 1999