Lines Matching +refs:default +refs:value
21 # color - A string giving the current color value
54 -value rgb -underline 0 -command {changeColorSpace rgb}
56 -value cmy -underline 0 -command {changeColorSpace cmy}
58 -value hsb -underline 0 -command {changeColorSpace hsb}
61 -value 1 -underline 0
63 -value 0 -underline 0
115 # typing in a color value.
139 label .sample.value -textvariable color -width 13 -font {Courier 12}
141 pack .sample.value -side bottom -pady .25c
182 # a change in the color space and after a named color value has
227 default {error "syntax error in color name \"$name\""}
273 # The procedure below converts an RGB value to HSB. It takes red, green,
318 # The procedure below converts an HSB value to RGB. It takes hue, saturation,
319 # and value components (floating-point, 0-1.0) as arguments, and returns a
324 proc hsbToRgb {hue sat value} {
325 set v [format %.0f [expr {65535.0*$value}]]
335 set p [format %.0f [expr {65535.0*$value*(1 - $sat)}]]
336 set q [format %.0f [expr {65535.0*$value*(1 - ($sat*$f))}]]
337 set t [format %.0f [expr {65535.0*$value*(1 - ($sat*(1 - $f)))}]]
345 default {error "i value $i is out of range"}