(******************************************************************************)
(*                                                                            *)
(*    The global constants and variables defined in this module are optional: *)
(* if you don't want to access their features, you needn't import them into   *)
(* your program. The variables in the parameter lists of the procedures are   *)
(* the only variables you are required to supply.                             *)
(*    When describing the order in which certain routines are called, I have  *)
(* adopted the curly-bracket notation of EBNF: routines in curly brackets {}  *)
(* may be called an arbitrary number of times (0 to n). A, {B}, {C, {D}} thus *)
(* implies that A is called once, followed by an arbitrary number of calls to *)
(* to B, followed by an arbitrary number of calls to C. Each of the calls to  *)
(* C may be followed by an arbitrary number of calls to D. Likewise, {{C},{D}}*)
(* implies an arbitrary number of calls to C and D in any order.              *)
(*                                                                            *)
(******************************************************************************)
(*                                                                            *)
(*  Version 1.00a.002 (Beta) :   March 2, 1988                                *)
(*                                                                            *)
(*    These procedures were originally written under version 1.20 of the TDI  *)
(* Modula-2 compiler. I have rewritten this module to operate under the v2.00 *)
(* compiler. However, should you find any problem or inconsistency with the   *)
(* functionality of this code, please contact me at the following address:    *)
(*                                                                            *)
(*                               Jerry Mack                                   *)
(*                               23 Prospect Hill Ave.                        *)
(*                               Waltham, MA   02154                          *)
(*                                                                            *)
(*    Check the module MenuUtils for TDI's (considerably less powerful) ver-  *)
(* sions of my Menu and IntuitionText procedures. The modules GadgetUtils and *)
(* EasyGadgets should also be of great help.                                  *)
(*                                                                            *)
(******************************************************************************)
(*                                                                            *)
(*    The source code to ColorTools is in the public domain. You may do with  *)
(* it as you please.                                                          *)
(*                                                                            *)
(******************************************************************************)

DEFINITION MODULE ColorTools;
 
FROM Intuition IMPORT ScreenPtr;

 
   (* These color values are from p.294 of the Amiga Programmer's Handbook *)
   (*  Vol. 1 by Eugene P. Mortimore; Sybex, Inc., Berkeley; 1987.         *)

CONST
   White     = 0FFFH;    GoldenOrange  = 0FB0H;    LightAqua = 01FBH;
   BrickRed  = 0D00H;    CadmiumYellow = 0FD0H;    SkyBlue   = 06FEH;
   Red       = 0F00H;    LemonYellow   = 0FF0H;    LightBlue = 06CEH;
   RedOrange = 0F80H;    ForestGreen   = 00B1H;    Blue      = 000FH;
   Orange    = 0F90H;    LightGreen    = 08E0H;    Purple    = 091FH;
   LimeGreen = 0BF0H;    BrightBlue    = 061FH;    Violet    = 0C1FH;
   Green     = 00F0H;    DarkBlue      = 006DH;    Pink      = 0FACH;
   DarkGreen = 02C0H;    MediumGrey    = 0999H;    Tan       = 0DB9H;
   BlueGreen = 00BBH;    LightGrey     = 0CCCH;    Brown     = 0C80H;
   Aqua      = 00DBH;    Magenta       = 0F1FH;    DarkBrown = 0A87H;
   Black     = 0000H;
   MaxColors = 32;     (* # of colors to load when calling SetScreenColors *)

VAR
   ScreenColors : ARRAY [0..MaxColors-1] OF CARDINAL;


   PROCEDURE SetScreenColors (CurrentScreen : ScreenPtr);


 (* SetScreenColors assigns ScreenColors to the color registers of Current- *)
 (* Screen. Though ScreenColors is assigned values upon import of this mo-  *)
 (* dule, I have spent little time determining which combinations are aes-  *)
 (* thetically appealing. Thus, don't count on ScreenColors having the same *)
 (* default values in later versions of this module.                        *)

END ColorTools.
