Next: 11.3.5 debug
Up: 11.3 Core Text Commands
Previous: 11.3.3 color
(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 (98)
- colorinfo colors:
returns a list of the named solid colors
- colorinfo <rgb | alpha | shininess |
ambient | specular> < name | colorid >:
returns the appropriate values for 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
}
Sergei Izrailev
Fri Jul 25 17:07:27 CDT 1997