Lines Matching refs:color

6 # This script implements a simple color editor, where you can
7 # create colors using either the RGB, HSB, or CYM color spaces
8 # and apply the color to existing applications.
19 # red, green, blue - Current color intensities in decimal
21 # color - A string giving the current color value
25 # updating the scales to load a new color,so
32 # automatically whenever the color changes.
33 # name - Name for new color, typed into entry.
39 set color #ffff00000000
50 .menu.file.m add radio -label "RGB color space" -variable colorSpace \
52 .menu.file.m add radio -label "CMY color space" -variable colorSpace \
54 .menu.file.m add radio -label "HSB color space" -variable colorSpace \
79 # Create the listbox that holds all of the color names in rgb.txt,
111 # Create the three scales for editing the color, and the entry for
112 # typing in a color value.
135 # Create the color display swatch on the right side of the window.
139 frame .swatch -width 2c -height 5c -background $color
140 label .value -textvariable color -width 13 \
146 # It propagates color information from the current scale readings
150 global red green blue colorSpace color updating autoUpdate
172 set color [format "#%04x%04x%04x" $red $green $blue]
173 .swatch config -bg $color
180 # a change in the color space and after a named color value has
205 # The procedure below is invoked when a named color has been
207 # the color into the editor.
210 global red green blue color autoUpdate
223 default {error "syntax error in color name \"$name\""}
226 error "syntax error in color name \"$name\""
233 set color [format "#%04x%04x%04x" $red $green $blue]
234 .swatch config -bg $color
238 # The procedure below is invoked when a new color space is selected.
240 # the appropriate values for the current color in the new color space
348 # and whenever the color changes if update mode is enabled. It
349 # propagates color information as determined by the command in the
353 global color command
355 regsub -all %% $command $color newCmd