Is there a "standard" X-window Color chooser? - Xwindows

This is a discussion on Is there a "standard" X-window Color chooser? - Xwindows ; 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 ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 23

Thread: Is there a "standard" X-window Color chooser?

  1. Is there a "standard" X-window Color chooser?

    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



  2. Re: Is there a "standard" X-window Color chooser?

    Thanks
    That's probably what I saw on SGI since they have Motif installed there
    by default.

    Norm

    "Fred L. Kleinschmidt" wrote in
    message news:41938987.7B104594@nospam_boeing.com...
    >
    >
    > Norm Dresner wrote:
    > >
    > > 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



  3. Re: Is there a "standard" X-window Color chooser?

    In article ,
    Norm Dresner wrote:
    >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

  4. Re: Is there a "standard" X-window Color chooser?



    Norm Dresner wrote:
    >
    > 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

  5. Re: Is there a "standard" X-window Color chooser?

    On Thu, 11 Nov 2004 15:02:44 +0000, Norm Dresner wrote:

    > 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).




  6. Re: Is there a "standard" X-window Color chooser?

    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


    "Rouben Rostamian" wrote in message
    news:cn025a$d3i$1@pc18.math.umbc.edu...
    > In article ,
    > Norm Dresner wrote:
    > >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



  7. Re: Is there a "standard" X-window Color chooser?

    Norm Dresner wrote:
    > 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.

  8. Re: Is there a "standard" X-window Color chooser?

    On Thu, 11 Nov 2004 20:55:11 +0000, Norm Dresner wrote:

    > 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.


  9. Re: Is there a "standard" X-window Color chooser? I NEED HELP

    "Wojciech Mula" wrote in message
    news:slrncp7nem.557.wojciech_mula@localhost.locald omain...
    > Norm Dresner wrote:
    > > 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.
    >


    Help!

    Okay, I've downloaded a file called xcolorsel_1.1a-10_i386.deb from that
    URL.

    It's not a tar -- it's not a gzipped tar --- it's not an rpm-file either.

    How do I install a Debian package on a RedHat system?

    TIA
    Norm


  10. Re: Is there a "standard" X-window Color chooser? DONE -- WAS: I NEED HELP

    "Norm Dresner" wrote in message
    news:vORkd.885223$Gx4.458529@bgtnsc04-news.ops.worldnet.att.net...
    > "Wojciech Mula" wrote in

    message
    > news:slrncp7nem.557.wojciech_mula@localhost.locald omain...
    > > Norm Dresner wrote:
    > > > 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.
    > >

    >
    > Help!
    >
    > Okay, I've downloaded a file called xcolorsel_1.1a-10_i386.deb from that
    > URL.
    >
    > It's not a tar -- it's not a gzipped tar --- it's not an rpm-file either.
    >
    > How do I install a Debian package on a RedHat system?
    >
    > TIA
    > Norm
    >



    God bless Google! I found a RedHat compatible .RPM file at

    http://rpmfind.net/linux/rpm2html/se...uery=xcolorsel

    and now I'm happily selecting colors!


    Many thanks for putting up with an X-window newbie.

    Norm


  11. Re: Is there a "standard" X-window Color chooser?

    In article ,
    Wojciech Mula wrote:
    >
    >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.


    Debian's xcolorsel is almost completely non-functional.
    Xcolorsel's main feature, which produces a listing of color
    names and sample patches, has been removed from the program.

    At least that's how it appears when it is run on SuSE linux.
    I would be surprised if it works any better on other
    platforms.

    --
    Rouben Rostamian

  12. Re: Is there a "standard" X-window Color chooser?

    rouben@pc18.math.umbc.edu (Rouben Rostamian) writes:

    >In article ,
    >Wojciech Mula wrote:
    >>
    >>Check http://packages.debian.org/stable/x11/xcolorsel


    >Debian's xcolorsel is almost completely non-functional.
    >Xcolorsel's main feature, which produces a listing of color
    >names and sample patches, has been removed from the program.


    >At least that's how it appears when it is run on SuSE linux.
    >I would be surprised if it works any better on other
    >platforms.


    I grabbed the source code from this site and compiled it on Solaris 9 (sparc)
    with almost no work other than setting the proper path to the rgb.txt file.
    It appears to run just fine.

    Regards,
    --
    C. Jeffery Small

  13. Re: Is there a "standard" X-window Color chooser? DONE -- WAS: I NEED HELP

    In article ,
    Norm Dresner wrote:
    >God bless Google! I found a RedHat compatible .RPM file at
    >
    > http://rpmfind.net/linux/rpm2html/se...uery=xcolorsel
    >
    >and now I'm happily selecting colors!


    That program almost works, but not quite.

    If it were compiled correctly, you would have been able to
    scroll through the colors with a scrollbar. In this version,
    the scrollbar is missing. The only way to scroll through
    the colors is by using the up/down arrows which is not as
    convenient.

    Additionally, it appears that resizing the window causes the
    display to get garbled.

    Other than that, it works OK.

    --
    Rouben Rostamian

  14. Re: Is there a "standard" X-window Color chooser?

    Rouben Rostamian wrote:
    > In article ,
    > Wojciech Mula wrote:
    >>
    >>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.

    >
    > Debian's xcolorsel is almost completely non-functional.
    > Xcolorsel's main feature, which produces a listing of color
    > names and sample patches, has been removed from the program.


    Could you put a screenschot somewhere. I chcecked xcolorsel and
    there are buttons called "set fore-/background" that works.

    w.

  15. Re: Is there a "standard" X-window Color chooser?

    In article ,
    Wojciech Mula wrote:
    >Rouben Rostamian wrote:
    >> In article ,
    >> Wojciech Mula wrote:
    >>>
    >>>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.

    >>
    >> Debian's xcolorsel is almost completely non-functional.
    >> Xcolorsel's main feature, which produces a listing of color
    >> names and sample patches, has been removed from the program.

    >
    >Could you put a screenschot somewhere. I chcecked xcolorsel and
    >there are buttons called "set fore-/background" that works.


    OK, here it is:

    http://www.math.umbc.edu/~rouben/xcolorsel.png

    --
    Rouben Rostamian

  16. Re: Is there a "standard" X-window Color chooser?

    On Thu, 11 Nov 2004 15:02:44 GMT, "Norm Dresner" wrote:

    >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

  17. Re: Is there a "standard" X-window Color chooser?

    "Jeffery Small" wrote in message news:I71M7D.5D@cjsa.com...
    > rouben@pc18.math.umbc.edu (Rouben Rostamian) writes:
    >
    > >In article ,
    > >Wojciech Mula wrote:
    > >>
    > >>Check http://packages.debian.org/stable/x11/xcolorsel

    >
    > >Debian's xcolorsel is almost completely non-functional.
    > >Xcolorsel's main feature, which produces a listing of color
    > >names and sample patches, has been removed from the program.

    >
    > >At least that's how it appears when it is run on SuSE linux.
    > >I would be surprised if it works any better on other
    > >platforms.

    >
    > I grabbed the source code from this site and compiled it on Solaris 9

    (sparc)
    > with almost no work other than setting the proper path to the rgb.txt

    file.
    > It appears to run just fine.
    >


    How does one unpack the .deb file that's available from this site?
    Norm


  18. Re: Is there a "standard" X-window Color chooser?

    in message ,
    wrote zentara ...

    > On Thu, 11 Nov 2004 15:02:44 GMT, "Norm Dresner" wrote:
    >
    >>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".

    ....
    > #!/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__


    Thanks for the code.

    Error messages are produced -- perl 5.8.5, Perl/Tk 804.027, w/
    strictures & warnings on FreeBSD 4.10-p3 -- after clicking the
    "Accept" button...

    Can't call method "OnDestroy" without a package or object reference at bin-perl/color-chooser line 11.


    ....or "Cancel" ...

    Can't call method "OnDestroy" on an undefined value at bin-perl/color-chooser line 11.


    - parv

    --
    As nice it is to receive personal mail, too much sweetness causes
    tooth decay. Unless you have burning desire to contact me, do not do
    away w/ WhereElse in the address for private communication.


  19. Re: Is there a "standard" X-window Color chooser?

    in message ,
    wrote 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".


    There are at least 2 gtk-1.2 based programs -- gyroscope & gcolor --
    to choose/select a color that let show at least the color wheel,
    RGB & HSV values input, and old/new color bars. I do not know how
    "standard" they are.

    Gcolor additionally allows to set background & foreground of text
    (similar to xcolors & xcolorsel) and shows color values related
    names. It does not have any obvious "quit" button; my window
    manager's (fvwm 2.5.11) "Close" function works just fine.

    Screenshots ...
    http://www103.pair.com/parv/tmp/gcolor.png
    http://www103.pair.com/parv/tmp/gyroscope.png


    And, xcolorsel built & worked fine (even has perfectly working
    scrollbars) here w/ Xaw3d-1.5 on FreeBSD 4.10-p3 ...

    http://www103.pair.com/parv/tmp/xcolorsel.png


    - parv

    --
    As nice it is to receive personal mail, too much sweetness causes
    tooth decay. Unless you have burning desire to contact me, do not do
    away w/ WhereElse in the address for private communication.


  20. Re: Is there a "standard" X-window Color chooser?

    "Norm Dresner" writes:

    > How does one unpack the .deb file that's available from this site?


    ,----
    | DEB(5) Debian DEB(5)
    |
    | NAME
    | deb - Debian binary package format
    |
    | SYNOPSIS
    | filename.deb
    |
    | DESCRIPTION
    | The .deb format is the Debian binary package file format. It is understood by
    | dpkg 0.93.76 and later, and is generated by default by all versions of dpkg
    | since 1.2.0 and all i386/ELF versions since 1.1.1elf.
    |
    | The format described here is used since Debian 0.93; details of the old format
    | are described in deb-old(5).
    |
    | FORMAT
    | The file is an ar archive with a magic number of !.
    |
    | [..]
    `----

    % ar tvf xxx.deb
    % ar xvf xxx.deb

    --
    CLICKED BY FOUR CORVETTES. ENGAGING PLOT DEVICE. U-857.

+ Reply to Thread
Page 1 of 2 1 2 LastLast