Discussion:
Is there a "standard" X-window Color chooser?
(too old to reply)
Norm Dresner
2004-11-11 15:02:44 UTC
Permalink
Before I reinvent the wheel one more time, I'd like to know if there's a
relatively standard generic X-window app to function as a "Color Chooser".
I remember seeing a few color-display and/or choice apps on SGI's IRIX
systems (but I don't have one running here right now to try them out again)
but I can't find anything either in the manpages or in the O'Reilly
X-programming series.

Ideally what I'd like as a user is to have a palette displayed and with a
mouse-click get a read-out of RGB values and -- if known -- a standard name
for the color I've chosen. A second choice would be a color mixer with
three sliding controls which I could use to adjust the relative R, G, and B
content of a color and to have the current color displayed in a box in
"real-time".

Of course, beggars can't be too choosy and for a one-time use I'd settle for
whatever exists before diving in to write my own. All URLs, pointers,
references, etc graciously accepted.

If it matters, the program needs to run on a PC with RedHat Linux 7.2, the
2.4.18 kernel, and XFree86-4.1.0-3.

TIA
Norm
Norm Dresner
2004-11-11 15:50:59 UTC
Permalink
Thanks
That's probably what I saw on SGI since they have Motif installed there
by default.

Norm
Post by Norm Dresner
Before I reinvent the wheel one more time, I'd like to know if there's a
relatively standard generic X-window app to function as a "Color Chooser".
I remember seeing a few color-display and/or choice apps on SGI's IRIX
systems (but I don't have one running here right now to try them out again)
but I can't find anything either in the manpages or in the O'Reilly
X-programming series.
Ideally what I'd like as a user is to have a palette displayed and with a
mouse-click get a read-out of RGB values and -- if known -- a standard name
for the color I've chosen. A second choice would be a color mixer with
three sliding controls which I could use to adjust the relative R, G, and B
content of a color and to have the current color displayed in a box in
"real-time".
Of course, beggars can't be too choosy and for a one-time use I'd settle for
whatever exists before diving in to write my own. All URLs, pointers,
references, etc graciously accepted.
If it matters, the program needs to run on a PC with RedHat Linux 7.2, the
2.4.18 kernel, and XFree86-4.1.0-3.
TIA
Norm
Motif2.2 has the ColorSelector.
--
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Common User Interface Services
M/S 2R-94 (206)544-5225
Rouben Rostamian
2004-11-11 15:57:30 UTC
Permalink
Post by Norm Dresner
Before I reinvent the wheel one more time, I'd like to know if there's a
relatively standard generic X-window app to function as a "Color Chooser".
I remember seeing a few color-display and/or choice apps on SGI's IRIX
systems (but I don't have one running here right now to try them out again)
but I can't find anything either in the manpages or in the O'Reilly
X-programming series.
Ideally what I'd like as a user is to have a palette displayed and with a
mouse-click get a read-out of RGB values and -- if known -- a standard name
for the color I've chosen. A second choice would be a color mixer with
three sliding controls which I could use to adjust the relative R, G, and B
content of a color and to have the current color displayed in a box in
"real-time".
There used to be a very nice program by Michael Weller called
xcolorsel that did pretty much what you want. Apparently it
was abandoned in 1994. You can still find its sources on
the net, however it does not compile on any modern system.
I tried patching it without success.

The last time I compiled it successfully was on RedHat 6.2.
Knowing that I wouldn't be able to compile it on newer
Linuxes, I linked it with the static (not shared) libraries.
The statically linked executable works very nicely on all
Linuxes, including the latest kernels.

If you want to, I can mail the executable to you.

Here is what xcolorsel does:

It displays the colors defined in /usr/X11R6/lib/X11/rgb.txt
with sample patches. You can select a color and have it
displayed as xcolorsel window's background. Similarly, you
can select a color and have it displayed as xcolorsel window's
foreground. This is very handy when you are experimenting
with various color combinations.

Additionally, you can grab a color from an arbitrary pixel from
anywhere on the screen and ask xcolorsel to find the closest
match in rgb.txt. I use that feature quite a lot, as well.

If anyone here has patched xcolorsel to bring it up to date,
I would be interested to know.
--
Rouben Rostamian
Norm Dresner
2004-11-11 20:55:11 UTC
Permalink
Rouben

I'm not sure if a RedHat 6.2 executable would run under 7.2 -- but I do know
that I'm using the same gcc version on 7.2 that I did under 6.2 so there's
probably a chance that it would.

I'd love to get a copy if you can find the time to find it and e-mail it to
me --- as long as it's under 8 MB or I'll run afoul of my ISP's mailbox
limit.

Thanks much

Norm
Post by Rouben Rostamian
Post by Norm Dresner
Before I reinvent the wheel one more time, I'd like to know if there's a
relatively standard generic X-window app to function as a "Color Chooser".
I remember seeing a few color-display and/or choice apps on SGI's IRIX
systems (but I don't have one running here right now to try them out again)
but I can't find anything either in the manpages or in the O'Reilly
X-programming series.
Ideally what I'd like as a user is to have a palette displayed and with a
mouse-click get a read-out of RGB values and -- if known -- a standard name
for the color I've chosen. A second choice would be a color mixer with
three sliding controls which I could use to adjust the relative R, G, and B
content of a color and to have the current color displayed in a box in
"real-time".
There used to be a very nice program by Michael Weller called
xcolorsel that did pretty much what you want. Apparently it
was abandoned in 1994. You can still find its sources on
the net, however it does not compile on any modern system.
I tried patching it without success.
The last time I compiled it successfully was on RedHat 6.2.
Knowing that I wouldn't be able to compile it on newer
Linuxes, I linked it with the static (not shared) libraries.
The statically linked executable works very nicely on all
Linuxes, including the latest kernels.
If you want to, I can mail the executable to you.
It displays the colors defined in /usr/X11R6/lib/X11/rgb.txt
with sample patches. You can select a color and have it
displayed as xcolorsel window's background. Similarly, you
can select a color and have it displayed as xcolorsel window's
foreground. This is very handy when you are experimenting
with various color combinations.
Additionally, you can grab a color from an arbitrary pixel from
anywhere on the screen and ask xcolorsel to find the closest
match in rgb.txt. I use that feature quite a lot, as well.
If anyone here has patched xcolorsel to bring it up to date,
I would be interested to know.
--
Rouben Rostamian
Wojciech Mula
2004-11-11 21:47:30 UTC
Permalink
Post by Norm Dresner
I'm not sure if a RedHat 6.2 executable would run under 7.2 -- but I do know
that I'm using the same gcc version on 7.2 that I did under 6.2 so there's
probably a chance that it would.
[...]
Check http://packages.debian.org/stable/x11/xcolorsel
I've got RedHat 7.2 and executable that comes with debian
package works fine on my system. Package size is 53kB.

w.
Last2Know
2004-11-11 22:34:45 UTC
Permalink
Post by Rouben Rostamian
Rouben
I'm not sure if a RedHat 6.2 executable would run under 7.2 -- but I do know
that I'm using the same gcc version on 7.2 that I did under 6.2 so there's
probably a chance that it would.
Debian packages tend to be pretty well autoconfed, so it's likely
you could build from the Debian source on Redhat even if the executable
didn't work well.
Conrad J. Sabatier
2005-05-14 02:50:33 UTC
Permalink
Post by Rouben Rostamian
Post by Norm Dresner
Before I reinvent the wheel one more time, I'd like to know if there's a
relatively standard generic X-window app to function as a "Color Chooser".
I remember seeing a few color-display and/or choice apps on SGI's IRIX
systems (but I don't have one running here right now to try them out again)
but I can't find anything either in the manpages or in the O'Reilly
X-programming series.
Ideally what I'd like as a user is to have a palette displayed and with a
mouse-click get a read-out of RGB values and -- if known -- a standard name
for the color I've chosen. A second choice would be a color mixer with
three sliding controls which I could use to adjust the relative R, G, and B
content of a color and to have the current color displayed in a box in
"real-time".
There used to be a very nice program by Michael Weller called
xcolorsel that did pretty much what you want. Apparently it
was abandoned in 1994. You can still find its sources on
the net, however it does not compile on any modern system.
I tried patching it without success.
The last time I compiled it successfully was on RedHat 6.2.
Knowing that I wouldn't be able to compile it on newer
Linuxes, I linked it with the static (not shared) libraries.
The statically linked executable works very nicely on all
Linuxes, including the latest kernels.
If you want to, I can mail the executable to you.
It displays the colors defined in /usr/X11R6/lib/X11/rgb.txt
with sample patches. You can select a color and have it
displayed as xcolorsel window's background. Similarly, you
can select a color and have it displayed as xcolorsel window's
foreground. This is very handy when you are experimenting
with various color combinations.
Additionally, you can grab a color from an arbitrary pixel from
anywhere on the screen and ask xcolorsel to find the closest
match in rgb.txt. I use that feature quite a lot, as well.
If anyone here has patched xcolorsel to bring it up to date,
I would be interested to know.
--
Rouben Rostamian
I just checked, and it's available in the FreeBSD ports collection, version
1.1a. If you'd like, I could mail you the port skeleton (Makefile, patches,
etc.).
--
Conrad J. Sabatier <***@cox.net> -- "In Unix veritas"
Russell Shaw
2005-05-14 03:07:16 UTC
Permalink
...
Post by Conrad J. Sabatier
Post by Rouben Rostamian
If anyone here has patched xcolorsel to bring it up to date,
I would be interested to know.
--
Rouben Rostamian
I just checked, and it's available in the FreeBSD ports collection, version
1.1a. If you'd like, I could mail you the port skeleton (Makefile, patches,
etc.).
It's also standard in debian X packages.

Fred L. Kleinschmidt
2004-11-11 15:47:19 UTC
Permalink
Post by Norm Dresner
Before I reinvent the wheel one more time, I'd like to know if there's a
relatively standard generic X-window app to function as a "Color Chooser".
I remember seeing a few color-display and/or choice apps on SGI's IRIX
systems (but I don't have one running here right now to try them out again)
but I can't find anything either in the manpages or in the O'Reilly
X-programming series.
Ideally what I'd like as a user is to have a palette displayed and with a
mouse-click get a read-out of RGB values and -- if known -- a standard name
for the color I've chosen. A second choice would be a color mixer with
three sliding controls which I could use to adjust the relative R, G, and B
content of a color and to have the current color displayed in a box in
"real-time".
Of course, beggars can't be too choosy and for a one-time use I'd settle for
whatever exists before diving in to write my own. All URLs, pointers,
references, etc graciously accepted.
If it matters, the program needs to run on a PC with RedHat Linux 7.2, the
2.4.18 kernel, and XFree86-4.1.0-3.
TIA
Norm
Motif2.2 has the ColorSelector.
--
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Technical Architect, Common User Interface Services
M/S 2R-94 (206)544-5225
Last2Know
2004-11-11 19:22:53 UTC
Permalink
Post by Norm Dresner
Before I reinvent the wheel one more time, I'd like to know if there's a
relatively standard generic X-window app to function as a "Color Chooser".
I remember seeing a few color-display and/or choice apps on SGI's IRIX
systems (but I don't have one running here right now to try them out again)
but I can't find anything either in the manpages or in the O'Reilly
X-programming series.
Ideally what I'd like as a user is to have a palette displayed and with a
mouse-click get a read-out of RGB values and -- if known -- a standard name
for the color I've chosen. A second choice would be a color mixer with
three sliding controls which I could use to adjust the relative R, G, and B
content of a color and to have the current color displayed in a box in
"real-time".
KDE has a standard chooser called KColorDiaglog that is pretty nice
and does the above except for the generating standard names (there may
actually be way to get standard names as there is a field for that, but I
don't know how to access that functionality though the desktop UI
if it is implemented - modifying a program to do this should be easy).
zentara
2004-11-12 16:53:41 UTC
Permalink
Post by Norm Dresner
Before I reinvent the wheel one more time, I'd like to know if there's a
relatively standard generic X-window app to function as a "Color Chooser".
Ideally what I'd like as a user is to have a palette displayed and with a
mouse-click get a read-out of RGB values and -- if known -- a standard name
for the color I've chosen. A second choice would be a color mixer with
three sliding controls which I could use to adjust the relative R, G, and B
content of a color and to have the current color displayed in a box in
"real-time".
Of course, beggars can't be too choosy and for a one-time use I'd settle for
whatever exists before diving in to write my own. All URLs, pointers,
references, etc graciously accepted.
This does exactly what you want. (TCL probably has this too,
but I like Perl/Tk).
#################################################
#!/usr/bin/perl
use Tk;
my $mw = new MainWindow( -title => "Color Selector" );
my $col = $mw->chooseColor(
-title => "Select a nice color...",
);
$col->OnDestroy(sub { Tk::exit });
MainLoop();
__END__
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
Pascal COLEAUX
2004-11-23 21:06:30 UTC
Permalink
Just try XFacemaker 4.0...
http://www.nsl.fr
Post by Norm Dresner
Before I reinvent the wheel one more time, I'd like to know if there's a
relatively standard generic X-window app to function as a "Color Chooser".
I remember seeing a few color-display and/or choice apps on SGI's IRIX
systems (but I don't have one running here right now to try them out again)
but I can't find anything either in the manpages or in the O'Reilly
X-programming series.
Ideally what I'd like as a user is to have a palette displayed and with a
mouse-click get a read-out of RGB values and -- if known -- a standard name
for the color I've chosen. A second choice would be a color mixer with
three sliding controls which I could use to adjust the relative R, G, and B
content of a color and to have the current color displayed in a box in
"real-time".
Of course, beggars can't be too choosy and for a one-time use I'd settle for
whatever exists before diving in to write my own. All URLs, pointers,
references, etc graciously accepted.
If it matters, the program needs to run on a PC with RedHat Linux 7.2, the
2.4.18 kernel, and XFree86-4.1.0-3.
TIA
Norm
Loading...