From: kemnitz@netcom.com (Greg Kemnitz)
Subject: Re: background/foreground colors
Date: Fri, 21 Aug 92 21:26:49 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 

In article <1992Aug21.171543.18627@fcom.cc.utah.edu> bryant@ced.utah.edu writes:
=
=It seems that a number of people misunderstood the question. I believe
=that I mentioned NOT wanting to use command-line arguments because there
=is no CONSISTENT way to have them work. The problem is that if I use
=an alias, then ".openwin-menu" lines have problems (C Shell vs Bourne
=Shell) causing me to have to keep TWO FILES consistent:
=
=  1) .openwin-menu  - for when I use a menu.
=  2) alias file - for when I type it on the command line.
=
=This also requires modifying files for EVERY USER OF THE SYSTEM individually,
=since we do not (I don't think you can) share common sections of
=an Openwindows Menu configuration file.
=
=This is not acceptable. The way that applications should get defaults is
=through the RESOURCE SYSTEM. This is the "standard" way. If the application
=fails to use it then it is BROKEN and should be FIXED. Considering that
=there are so many applications (XTerm for one) that DO work the right
=way, it doesn't seem a hard thing to ask.
=
=I have also not heard any responses on why changing the window foreground color
=should change menu text, while changing the background color does NOT change
=the menu background. According to this, if I execute:
=
=    cmdtool -bg black -fg gray
=
=I get a very nice black-background gray-text command tool, but with completely
=WORTHLESS INVISIBLE MENU ITEMS! Try it!
=
=Bryant Eastham
=Programmer/System Administrator
=Center for Engineering Design
=University of Utah
=bryant@ced.utah.edu
=


This is a simple man page reading.

First 'man cmdtool', find out cmdtool is a xview product, not a
Mit X product and give me directio to xview.

Then 'man xview', find out,

     Argument(s):   -Wf, or -foreground_color
     Type:          integer integer integer
     Resource Name: Window.Color.Foreground
     Default:       0 0 0
     Description    See Description in -Wb below.
 
     Argument(s):   -Wb, or -background
     Type:          integer integer integer
     Resource Name: Window.Color.Background
     Default:       255 255 255
     Description:   These options allow the user to  specify  the
                    foreground color (e.g., the color of the text
                    in a textsw), or the background color  (e.g.,
                    the  color that the text is painted on) of an
                    application.   The  three  values  should  be
                    integers between 0 and 255.  They specify the
                    amount of red, green and blue that is in  the
                    color.    See  -fg and -bg below for informa-
                    tion on similar functions.
     Example:       cmdtool -Wf 0 0 255 -Wb 100 100 100
                    (would come up with a blue foreground, with a
                    gray background)
 
     Argument(s):   -fg, or -foreground
     Type:          string  (color  name,  or  hexidecimal  color
                    specification)
     Resource Name: Window.Color.Foreground
     Default:       black
     Description:   See Description in -bg below.
 
     Argument(s):   -bg, or -background
     Type:          string  (color  name,  or  hexidecimal  color
                    specification)
     Resource Name: Window.Color.Background
     Default:       white
     Description:   These options are similar to the -Wf and  -Wb
                    options,  except that they take a color argu-
                    ment in the form of a predefined  color  name
                    (lavender,   grey,   goldenrod,   etc.)  from
                    $OPENWINHOME/lib/rbg.txt,  or  a  hexidecimal
                    representation.   The hexidecimal representa-
                    tion is of the form pound sign  (#)  followed
                    by the hexidecimal representation of the red,
                    green and blue aspects of the color.
     Examples:      cmdtool -fg blue -bg gray
                    (comes up with a blue foreground, with a gray
                    background)
                    cmdtool -fg #d800ff -bg white
                    (comes up with a purple  foreground,  with  a
                    white background)
 
Now you should be able to figure out how to set up your resources.