
                             [1m//
                         \\ // EasyColor V1.1
                          \//[0m

                               1991
                                by
                          [1m[33mPreben Nielsen[0m



[1mWHAT'S NEW SINCE V1.0 ?[0m

    Not much actually - only improved 'Undo' facility when editing a single
  color.



[1mWHAT IS EASYCOLOR ?[0m

    EasyColor is a color palette tools that you can include in your own
  programs. It can work on any screen as long as it is at least 254x119
  pixels big. It works with any number of colors from 2 to 32. It also
  works on EHB and HAM screens.



[1mHOW TO TEST EASYCOLOR[0m

    Run the program 'EasyColor_Demo' which is a usable demo of EasyColor.
  It always opens the EasyColor window on the frontmost screen.



[1mHOW TO USE EASYCOLOR IN YOUR OWN PROGRAM[0m

    You can use EasyColor as a function-call from your own program.
  To Use EasyColor you will have to link your program with EasyColor.o.
  If you program in assembler then you could also work directly with
  the source code. The EasyColor.o does NOT need any external symbols
  such as SysBase etc. It opens and closes all the libraries that it
  needs.


  In C EasyColor is declared to be seen as:

  Long EasyColor( screen, title, x, y )
  struct Screen *screen;
  char *title;
  word x,y;

  where

  screen     is a pointer to the screen that EasyColor should open its window
             on. If you specify NULL then EasyColor will open its window on
             the Workbench screen.
              
  title      is a pointer to a NULL terminated string to be used as title of
             the EasyColor window. You may specify NULL if you don't want any
             title.

  x          is a 16 bit value (WORD) specifying the initial x-position of the
             EasyColor window. Remember that the screen has to be at least
             x+254 pixels wide.

  y          is a 16 bit value (WORD) specifying the initial y-position of the
             EasyColor window. Remember that the screen has to be at least
             y+119 pixels high.


  EasyColor returns a 32 bit value telling you what happened:

     EC_OK     means that the user selected the 'Ok' button.

     EC_CANCEL means that the user selected the 'Cancel' button or the
               CLOSEWINDOW gadget.

     EC_ERROR  probably means that EasyColor couldn't open the window.
               Either the screen is too small or you specified invalid
               coordinates.



    If you want to use EasyColor from assembler then you don't have to pass
  EasyColor its arguments by using the stack. Instead you can call it by the
  name EasyColorA with the arguments in registers. The registers used are:

  result = EasyColorA( screen, title,  x,    y  )
   D0:32                 A0     A1   D0:16 D1:16


    Calling EasyColor will bring up a window looking like this:

 These are three normal
 proportional gadgets which can           This area shows the
 be used to adjust the RGB values         currently selected
 of a selected color.                     color.         \
  |                                                       \
  |        .-------------------------------------------.   |  This area is
  |        | O | Change the colors please              |   |  where you select
  |        |-------------------------------------------|   |  the color to 
  |        |   .----------------------.    .---------. |   |  work with. It
  |      > | R |          |X|         | 08 |         | |  /   will show 2, 4
   \    /  |   `----------------------'    |         | | /    8, 16 or 32
    \--|-> | G |            |X|       | 09 |     <------/     colors depending
        \  |   `----------------------'    |         | |      on the screen
         > | B |               |X|    | 10 |         | |      that you opened
           |   `----------------------'    `---------' |      the window on.
           | .---------------------------------------. |      It will show 32
           | |                                       | |      colors for EHB
           | |                                    <---------- screens and 16
           | |                                       | |      colors for HAM
           | `---------------------------------------' |      screens. When a
           | .---------.---------.---------.---------. |      color is selected
        /--->|  Copy   |   Exg   |  Undo   |  Reset  |<---    there wil be a
       /   | `---------'---------'---------'---------' |  \   frame around it.
      /    | .---------. ^  .---------. ^  .---------. |   \
     /     | |    Ok   | |  | Spread  | |  | Cancel  | |    \
    /      | `---------' |  `---------' |  `---------' |     \
   /       `-----^-------|-------^------|-------^------'      \
  /              |       |       |      |       |              \
Click here       |       |  Click here   \      |           Click here to get
to enter         |       |  to enter the  |  Click here     the original colors
the COPY   Click here     \ SPREAD mode.  |  when you want  back.
mode.      when you want   \              |  to leave the
           to leave the     \             |  color palette
           color palette     |            |  and don't want
           and want to keep  |            |  to keep the changes
           the changes that  |            |  that you have made.
           you have made.    |            |  This is the same as
                            /             |  clicking the CLOSEWINDOW
                    Click here            |  gadget.
                    to enter the          |
                    EXCHANGE mode.  Click here to undo
                                    the last color-modifying
                                    action. You can undo an
                                    'Exg', 'Copy', 'Spread',
                                    'Reset' and even an 'Undo'.
                                    Lets suppose that you want to start
                                    modifying a color that has RGB-value
                                    08 08 08. Now you change the values to
                                    04 12 07 but decide that it is an ugly
                                    color. 'Undo' will now bring you back
                                    to 08 08 08. Clicking 'Undo' again will
                                    immediately bring you back to 04 12 07.
                                    Actually, in such a case 'Undo' will
                                    always toggle between the original RBG
                                    values and the last modification.


    Copy, Exchange and Spread works as in most other palette tools and
  paint programs. If you click on one of the Copy, Exhange or Spread
  buttons then the titlebar will show

   '[1mCopy: Select color[0m',

   '[1mExchange: Select color[0m'

  and

   '[1mSpread: Select color[0m'

  respectively. This is to make you aware of what you are about to do.
  If you do something by accident then you can always correct it by
  choosing Undo. 



[1mCOMPATABILITY ![0m

    EasyColor has been tested under kickstart 1.2, 1.3 and 2.x on a
  2.5 MB 68000 based Amiga 1000 (0.5 MB chip-ram). If any problems
  is encountered with other configurations then let me know.



[1mCOPYRIGHT NOTICE !![0m

  EasyColor is [1mPublic Domain[0m. I would, however, be very pleased
  to get credit in some way if you choose to use it in a program.



[1m=====================================================================[0m
   Send [1mbug-reports[0m, [1msuggestions[0m, [1mcomments[0m etc. to:

        [1m///
       ///  Preben Nielsen
 \\\  ///  Oehlenschlægersgade 72 st. T.V.
  \\\///  1663 Copenhagen V.
   \///  Denmark
        Phone: (009 45) 31 21 55 09[0m

