#!/usr/bin/wish # $Id: color,v 1.1 2002-07-31 14:33:44-06 braup Exp braup $ scale .red -label Red -from 0 -to 255 -length 10c -orient horizontal -command newColor scale .grn -label Green -from 0 -to 255 -length 10c -orient horizontal -command newColor scale .blu -label Blue -from 0 -to 255 -length 10c -orient horizontal -command newColor frame .sample -height 1.5c -width 6c pack .red .grn .blu -side top pack .sample -side bottom -pady 2m frame .ex pack .ex -side bottom button .ex.but -text Exit -command exit pack .ex.but -side bottom proc newColor value { set color [format #%02x%02x%02x [.red get] [.grn get] [.blu get]] .sample configure -background $color }