<TITLE>Color Table Development Notes</TITLE>

<H1>                 Color Table Development Notes                     </H1>
<H2>             Anthony's X Icon Library (version 1.5)                </H2>


<H3> Sections: </H3>
<MENU>
<LI><A HREF="#why">   Why use a `standard icon color table'   </A>
<LI><A HREF="#how">   Development of the color table          </A>
<LI><A HREF="#what">  The current `standard icon color table' </A>
<LI><A HREF="#when">  Changes made to the color table         </A>
</Menu>


<A NAME="why">
<H3>  Why use a `standard icon color table'  </H3>
</A>

    The icons individually use only a couple of colors (rarly more than
  5), but when you use a large group of icons, you very quickly use up all
  the colors available on a standard puesdo-color Xterminal. Thus very
  soon a new application will appear to use many differant colors than
  what it normally would use. This problem is made even worse by the
  ``angry fruit salad'' setup as Peter Norby <norby@soda.berkeley.edu>
  puts it.<P>

  <DL>
  <DT> ``angry fruit salad'' (n). --
  <DD>    A bad visual-interface design that uses too many colors.
       This term derives, of course, from the bizarre day-glo colors found
       in canned fruit salad.)  Too often one sees similar effects from
       interface designers using color window systems such as {X}; there
       is a tendency to create displays that are flashy and
       attention-getting but uncomfortable for long-term use.<P>
  </DL>

    The need is a small set of colors, say 20 to 30, which all icons,
  and window managers can follow and MOST APPLIACTIONS as well. Only a
  few applications should require extra colors outside this color table,
  in particular, graphic applications for, drawing, pictures, animation
  etc.<P>

    The color table can, if the user desires, should be loadable as
  permenant shared color table entries, with the remainig colors (about
  230 colors) usable by applications with special color needs (see
  above). This can be done.<P>

    The colors used by a background picture or pattern, is also of concern
  in this matter.  But I leave the choice of, and the number of, colors
  used up to the user involved.  To this end I have not changed any colors
  used by the color background patterns, though some of these patterns
  could also follow the standard color table developed below.<P>

    I tried to start a discussion in `comp.windows.x' at the start of the
  year (Feb '93) about some sort of `standard color table' that icons
  should follow, however no response was received by the network on this
  matter.<P>


<A NAME="how">
<H3>   Development of the color table  </H3>
</A>

    Developing a small color table for general use for icons is not easy
  to say the least. This is not a simple problem and no simple solution
  exists. Formulated solutions only work (in general) for color maps
  involving more than 100 colors (the large number the better).  Previous
  problems of this type are usally solved by hand for the requirments at
  that time.<P>

    A common solution is to use a 3x3x3 color cube to provide a total of
  27 colors. This however is far from satisfactory.  While the grey scale
  and primary/secondary colors provided by the color cube are well used by
  applications and icon images, the other colors are very dark and
  oppressive, which are often, just not used.<P>

    Also an number of other important colors are not available in a 3x3x3
  color cube.  For example, no brown or tan colors are present, a very
  common need by most applications and icon images. Simularly certian
  shades in some of the primary colors are also usally required for
  various purposes. In particular, a blue color scale is often required by
  application writers for the purpose of 3 dimensional effects.<P>

    All this is well and good but we still need some sort of color table.
  After great deliberation on this subject, I came up with the following
  requirements:-<P>
  <UL>
  <LI> Color table should at least include :-
    <UL>
    <LI> a small grey scale    black, 2 shades of grey and white
    <LI> the 6 primary/secondary colors
	     magenta, red, yellow, green, cyan, and blue
    <LI> darker and lighter forms of the 6 primary/secondary colors
    </UL><P>

  <LI> A few brown or tan colors. 
       Particularly for use in skin tones, and paper colors.<P>

  <LI> Colors used should appear in the X Window RGB color database.
       These colors (should) be the most common colors in use by the X
       comunity and thus (should) more sharable. This also provides more
       symbolic naming for the colors, which is already widely used.<P>

  <LI> A absolute maximum of 32 colors in the final color table.
       Note however that I do NOT intent to pick all the colors
       immediatly.  Nor should I.<P>

  </UL><P>

    Toward the above requirements, I needed a small list of colors from
  the RGB color database which are already commonly used.  To do this I
  looked at the various colors used by the various applications and window
  manager setups used on our local system. The results of this survey are
  as follows :-<P>
  <UL> 
  <LI> All but one of the applications using colors didn't use color names.
       A couple of other applications only had one or two direct color pixel
       values. In general, almost all color references were by name.<P>

  <LI> All the primary/secondary colors were heavily used by just about
       all applications with the exception of "magenta", which was only used
       by one application.  This was very interesting, considering 5
       applications opted to use a "maroon" (dark magenta-red) color.<P>

  <LI> Approximately 10 differant off-whites were used. Basicaly an
       application selected one of the off-whites for use instead of using
       a plain "white" colour.  Due to the large varity available, almost
       all application writers then selected a differant off-white to
       use.  Maybe the user should be allowed to select a common off-white
       color for general use on his/her display. <P>

         ASIDE: The most common off-white was "ivory" with "snow" a close
       second. All other off-white colours appeared only once.<P>

  <LI> A very large varity of blue colors were used by differant
       applications.  This looks to be the main color area used for shading
       effects.  If an application writer used only a single `blue' color in
       his/her application, he/she then generally picked the primary "blue"
       color.<P>

  <LI> Ignoring white, black, numbered colors (like "RoyalBlue3"), and
       off-white colors, the numerical results of the survey were:
     <PRE>
     #applications       colors used
	> 5   :  red (17),  yellow (10),  blue (9),   green (7),
                 grey (7),  wheat (7),   maroon (5),  cyan (5),

          4   :  light grey,  navy,  cadet blue
          3   :  slate grey,  gold,  lemon chiffon

          2   :  steel blue,  medium blue,  light blue,  aquarmarine,
                 dark green,  sea green,  tan,  orchid,
                 pink,  indian red,  light yellow

          1   :  magenta,  plum,  purple,  violet,  
                 tomato,  coral,  firebrick,  brown,  orange,
                 khaki,  sienna,  goldenrod,  light goldenrod,  sienna,
                 pale green,  chartreuse,  dark turquoise,  pale turquoise,
                 light cyan,  light sky blue,  sky blue,  deep sky blue,
                 powder blue,  cornflower blue,  dodger blue, 
                 royal blue,  light slate blue,  slate blue,  dark slate blue,
                 
                 and 11 differant off-whites.
       </PRE><P>
  </UL><P>

    I was thinking of using this exercise with icons but most icons color
  selections already present in the collection seem to have no bearing on
  the RDB color name database.<P>

  I used the above results to form `Color Groupings' and a few `Special
  Color Scales'.  This resulted in the following list of color groups and
  sclaes.  I have also places a few comments on particular colors.<P>
  <PRE>
   Color Groupings              Color/s
     Blue-Magenta       "purple"
     Dark Magenta       "maroon"
     -- magenta --
     Light Magenta      "violet",  "plum",  "orichid"
     Dark Red           "brown",   "firebrick",  "indian red"(?)
     -- red --
     Light Red          "coral",  "tomato",  "pink"(too light?)
     Red-Yellow         "orange"
     Dark Yellow        "gold",  "light goldenrod",  "goldenrod"
     -- yellow --
     Light Yellow       "lemon chiffon",  "light yellow"(too light?)
     Green-Yellow?      "green yellow",  "lawn green"
                            "chartreuse",  "yellow green"(?)
     Dark Green         "lime green",  "sea green",  "dark green",
     -- green --
     Light Green        "pale green",  "spring green"
     Green-Cyan         "aquamarine"
     Light cyan         "light cyan"(too light?)
     -- cyan --
     Dark Cyan          "pale turquoise",  "turquoise",  "dark turquoise",
     Very Light Blue    "light blue",  "powder blue"
     Lighter Blue       "deep sky blue",  "sky blue",  "light sky blue"
     Light Blue         "dodger blue",  "cornflower blue",  "royal blue",
                            "steel blue",  "light slate blue",
                            "slate blue",  "cadet blue"(?),
     -- blue --
     Dark Blue          "navy",  "medium blue",  "dark slate blue"


   Special Color Scales
     Grey Scale         "black",  "dark slate grey",  "slate grey",
                            "dim grey",  "grey",  "light grey",
                                 "gainsboro",  "white"

     Brown Scale        "sienna",  "chocolate",  "peru", "orange",
                            "sandy brown" (close to orange), 
                              "burlywoord" (close to tan)

     Tan Scale          "tan",  "wheat",  "lemon chiffon",
                            "khaki"(a bit too yellow)
  </PRE><P>


<A NAME="what">
<H3>  The Current `Standard Icon Color Table'.  </H3>
</A>

    The above exercise allowed me to select colors to form a (I hope) good
  standard color table to start with, and one which seems to cause minimal
  problems when recoloring the color icons already in the collection.<P>

    I did not use all the color groups listed above.  For example I have
  provide no light or dark cyan color in the current color table and so
  far have found no problems. Instead I have added an extra light blue
  color.<P>

    The final color table, listed in varous color scales is as follows :-
  <PRE>
  .-----------------------------------------------------------------------.
  |    "black",     "dark slate grey",     "slate grey",            |     |
  |                         "grey",     "gainsboro",     "white"    |   6 |
  |               "purple",    "magenta",    "violet"               |   3 |
  |  "firebrick",  "red",  "tomato",  "orange",  "gold",  "yellow"  |   6 |
  |                "sienna",  "peru", +--^                          |   2 |
  |               "tan",   "wheat",   "lemon chiffon"               |   3 |
  |       "sea green",  "lime green",  "green",  "pale green"       |   4 |
  |      "navy",  "blue",  "dodger blue",  "sky blue",  "cyan"      |   5 |
  `-----------------------------------------------------------------------'
                                                                Total: 29
  </PRE><P>

    These colors are also displayed in the icon "colortable.xpm" in the
  `cl-misc' section of this collection. Also in this section is a icon
  with one pixel representing each color, "colormap.xpm". I convert this
  icon into the PbmPlus (ppm) format to use with the `ppmquant' program.
  This makes it easy to write a script to recolor icons, though you still
  need to check at how well it turned out.<P>

    The following table is a list of the number of pixels of each color
  are present in all X pixmap files (except in the gr-misc section)
  at the time of the last release (v 1.5).<P>

  <PRE>
        Color Name          Pixels      Color Name         Pixels
        ----------------    ------      ----------------   ------
	white               302210      dodger blue          9971
	black               157289      dark slate grey      8361
	grey                 43542      sienna               8325
	slate grey           39573      tan                  7722
	red                  33935      orange               7482
	lemon chiffon        31368      lime green           5126
	wheat                31093      sky blue             4941
	cyan                 26894      magenta              4107
	yellow               22730      peru                 3956
	blue                 20476      tomato               3707
	sea green            19282      gold                 3155
	firebrick            12447      violet               2228
	green                11467      pale green           2167
	gainsboro            11072      purple                294
	navy blue            10923
  
       over 695 xpm files in the libary conforming to the standard color
       table  (those not in "icons/gr-misc" or "icons/cl-bgnd").
  </PRE><P>

    In the future, I may remove a few colors that do not seem to be used
  much and are fairly close to other colors (see below for the changes
  that have occured.  The above table is in particular need of a couple of
  very light colors such as a very very light blue/cyan, and a very very
  light red.<P>

<A NAME="when">
<H3>   Changes made to the above table   </H3>
</A>
  <DL>
  <DT> V1.4:
  <DD>    Original color selections made -- 30 colors.

  <DT> V1.5:
  <DD>    The original color ``dark green'', was replaced by a lighter
      color ``sea green''.  The original dark green proved to to too dark
      for most situations, and too distant for the next green color ``lime
      green''.  This change should (and has) allowed the better use of the
      green color scale.<P>

	A new color ``purple'' added to provide better linkage between the
      red and the blue areas of the color table. I expect that while the
      icons already in the library will not be changed to use this color,
      I beleive new additions will make good use of it.<P>

	The original color ``maroon'' was removed and the existing usage
      of this color swicthed to ``firebrick'' which it very closly
      resembles.<P>

        The color "sandy brown" removed as it too closly matchs the color
      "orange" which is used to replace it in existing icons.<P>

      Creating a new total of 29 colors in standard table. <P>

   </DL><P>

<HR><P>
   Any suggestions on color choices, changes, and/or pointers to published
 material. will be most welcome.<P>
  
<PRE>
  Anthony Thyssen - (SysProg @ Griffith University)     anthony@cit.gu.edu.au
------------------------------------------------------------------------------
     Life (n).      A sexually transmitted disease which afflicts some
                people more severly than others.
------------------------------------------------------------------------------
</PRE>
