Mailinglist Archive: opensuse (3242 mails)
| < Previous | Next > |
Re: [SLE] Better program than xcolors?
- From: Derek Fountain <fountai@xxxxxxxxxxxxxxx>
- Date: Fri, 14 Sep 2001 08:56:22 +0100
- Message-id: <0109140856220C.00621@boggit>
> Somewhere or other, quite a while ago, I saw a program that does the same
> thing as xcolors, only better and more conveniently, i.e., it shows you
> the color associated with each name in the X rgb color map. Can anyone
> point me to it? I tried to locate it via both freshmeat and google but
> failed.
You could use a Tcl/Tk script to do it. Put the code below in an executable
file, run it, then double click on the colour names in the list box. Drag
with the middle mouse button to scroll the list.
#!/usr/bin/wish
pack [listbox .colours]
set h [open /usr/lib/X11/rgb.txt]
while {[gets $h l] >= 0} { .colours insert end [lrange $l 3 end]}
close $h
bind .colours <Double-Button-1> {
.colours configure -background [selection get]
}
> thing as xcolors, only better and more conveniently, i.e., it shows you
> the color associated with each name in the X rgb color map. Can anyone
> point me to it? I tried to locate it via both freshmeat and google but
> failed.
You could use a Tcl/Tk script to do it. Put the code below in an executable
file, run it, then double click on the colour names in the list box. Drag
with the middle mouse button to scroll the list.
#!/usr/bin/wish
pack [listbox .colours]
set h [open /usr/lib/X11/rgb.txt]
while {[gets $h l] >= 0} { .colours insert end [lrange $l 3 end]}
close $h
bind .colours <Double-Button-1> {
.colours configure -background [selection get]
}
| < Previous | Next > |