PaletteTool - a Public Screen palette for 32 or more colors ----------------------------------------------------------- Copyright ©1993 by Timothy B. Kreuzer. All rights reserved. Version: 1.2 Author: Tim Kreuzer (and the KreuzerSoft support team) Language: SAC/C V6.3 Features: Opens on the default public screen (initially the Workbench) Supports 32, 64, 128, and 256 color modes only (*) Full 8 bit RGB support Protects the 8 Workbench colors and the 3 pointer colors Supports "color spreads" and individual color copying Supports color cycling of entire palette in both directions with adjustable cycle speed Features an "undo" for the last copy or spread action (*) Iconify function Upon exit, restores palette to where it was at start-up Separate versions for: 68020 CPU (A1200) (*) 68030 CPU (A1200/A4000) 68040 CPU (A4000) Tested OK using the Enforcer (*) = New in Version 1.2 Limitations: Can only be used from the Workbench (start via Icon). Version 1.2 Notes ----------------- Added full 8-bit RGB support (Hurray!). Added Iconify ("I" button) support. Added About ("?" button). Added support for "X" and "Y" icon tooltypes to determine position of PaletteTool window at startup. Corrected the Spread function's math to allow "smoother" spreads. PaletteTool will no longer open on a screen that supports less than 32 colors; a nice requester will pop up to remind you of this if you try. Fixed problem where original palette was not correctly restored upon quiting following certain types of Undo actions. Fixed problem where the currently selected color's RGB slider values were not correctly reset after an Undo action. All other features operate the same as in version 1.1. Version 1.1 Notes ----------------- Added the Copy, Undo, and Spread capabilities. Added the "restore palette at exit" capability. All other features operate the same as in initial release version. The loading and unloading of the palettes at the beginning and end of cycling can lock up your Amiga for 1 second or so. DON'T PANIC IF THIS SHOULD HAPPEN! OK? Sorry for yelling! Why did I create PaletteTool? ----------------------------- After deciding to take the plunge and buy an A4000 (which, by the way, is a fantastic machine!), I was disappointed in the current lack of applications which exploit the increased color capabilities of 3.0/AGA. I went about creating some simple, yet fun, graphics toys with would exploit the color modes above 16 (see my Fractal, Lyapunov Space, and Terrain uploads). Then I realized that these graphic toys needed some type of palette control, as Commodore saw fit to release a palette tool which would only handle the 8 Workbench colors. This need resulted in PaletteTool. I decided that is was much better to implement the palette control for these applications as a separate utility, rather than embed it within each one. NOTE that PaletteTool can be used to alter the color palette of ANY Workbench or Public Screen which supports at least 32 colors. It's functioning is not in any way dependant upon the presence of the Fractal, Lyapunov Space, or Terrain programs. IF YOU HAVE FRACTAL, LYAPUNOV SPACE, OR TERRAIN, PREPARE TO BE IMPRESSED BY WHAT COLOR CYCLING AND THE FULL 8-BIT RGB SUPPORT WILL DO FOR YOUR IMAGES! How do you use PaletteTool? --------------------------- Just click on the PaletteTool icon. PaletteTool will detect the number of colors available on the default Public Screen, and open it's window on this screen. Note that the Workbench screen is the standard default Public Screen. You can get PaletteTool to open on ANY public screen (like the AGA ones opened by Window Blender) by using you favorite public screen utility to change the default public screen. I use PublicScreenX to accomplish this. PaletteTool window description ------------------------------ The PaletteTool window consists of the following items: 1) The current screen palette (color register display) is at the top of the window. This is where you select (using the pointer and the left-mouse-button): - the color to be modified by the Red/Grn/Blu sliders - the colors associated with Copy and Sprd (spread) actions. 2) A box which displays the currently selected color (on the middle-right side of the window). 3) Three color modification sliders, one each for the Red (Red), Green (Grn), and Blue (Blu) color components. 4) A "Show" button which flashes the currently selected color. 5) A "Sprd" button which allows spreads (gradients) between two selected color register. (Note that spread "from" color register must be prior to the "to" color register - more on this later.) 6) A "Copy" button which allows the copying of one color register's RGB values into another color register. 7) An "Undo" button which restores the palette colors to how they were prior to the immediately previous Copy or Sprd (spread) action. Note that I said "how they were prior to the immediately previous Copy or Sprd (spread) action". Don't get confused and think that the program is acting up when you do an Undo, and some individual color register mods you have made since the last Copy/Sprd get wiped out! IMPORTANT - Repeatedly selecting Undo will toggle the palette between where it was (before the last Copy/Spread) and where it is (before you selected Undo). Try this to get a better (or any) sense of what I'm trying to explain ;v). 8) A "Cycle" button which starts/stops the cycling of all colors in the palette. Note that all non-cycle-related sliders/buttons/etc. are disabled while cycling is in progress. 9) A "Spd" slider, which control the speed of the color cycling. Values range from 1 (= slowest) to 20 (= fastest). Note that the cycle speed control is active during cycling (i.e., you can change speeds which you are cycling). 10) A cycle-direction control. Forwd = Forward Cycle and Revrs = Reverse Cycle. Note that the cycle-direction control is active during cycling (i.e., you can change directions while you are cycling). 11) An "I" (Iconify) button, which changes the PaletteTool window into a single ("Open") button. Pressing the Open button will restore the PaletteTool window. 12) A "?" (About) button, which opens an info requestor. PaletteTool operation ---------------------- You select a color for modification (or just viewing) by left-clicking on one of the colors in the palette display. This becomes the "active" color. The "currently selected color" box on the middle-right side of the window will change to show you the color you just picked. If you get confused as to which color you actually picked (which can easily happen with 256 colors!), pressing the "Show" button will flash the currently selected color. Once a color is selected, it's RGB components can be modified by using the three Red/Grn/Blu sliders. Color "spreads" -------------- Color spreads between two palette colors is accomplished via the "Sprd" button. To perform a "spread": - first select the starting color - hit the "Sprd" button - then select the ending color All intermediate color registers will then be changed to a smooth gradient between the staring and ending colors. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >> Note that spreads only work in the "positive color register << >> direction". That is, the ending color must be physically to << >> the right and/or down from the starting color. << >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Color copying ------------- The copying of a color from one register to another is accomplished via the "Copy" button. To perform a copy: - first select the color to be copied - hit the "Copy" button - then select the register where that color should be copied-to Note that unlike spreads, you can copy any color register to another one. About the palette display ------------------------- The palette display is fixed in size. Therefore, the displayed size of each color in the palette decreases as the number of screen colors increases. The color registers are displayed in "row sequential form" from left-to- right and top-to-bottom. Therefore, the first row in the palette display consists of color registers 0, 1, 2, 3, 4, etc. Icon Tooltypes -------------- X = - The X-coordinate at which the PaletteTool window will initially open. Y = - The Y-coordinate at which the PaletteTool window will initially open. If these tooltypes are not present, the PaletteTool window will open at coordinates X=10 Y=10. About the "protected screen colors" ----------------------------------- It appears that the 8 colors used by the Workbench display (window borders, backgrounds, highlighting, etc.) are always assigned to the following color registers: 0,1,2,3 >and< the last four colors in the screen palette. PaletteTool will NOT allow you to select these 8 color registers. Additionally, color registers 17, 18 and 19 appear to be consistently reserved for the screen pointer. PaletteTool will NOT allow you to select these 3 color registers). ************************************************************************** If you attempt to select one of these color register, nothing will happen. ************************************************************************** In fact, if you are selecting the "to" color register for a Copy or Sprd (spread) action, the pending action will be cancelled. PaletteTool operates this way because I didn't want to able to screw up the colors which the system (or you for that matter) expect to remain unchanged. Note that the three pointer colors will also be skipped if you do a spread whose starting color register number is less than 17, and whose ending color register is greater than 19. This allow you to do spreads without having to worry about "clobbering" the pointer colors. Other considerations -------------------- The user should exercise care when changing any color which another application on the screen may already be using. If you are uncertain about this, just use the "Show" button to flash the color. This will flash the color in the palette display as well as any other place that color register is employed. Additional note: For Workbench backdrop pictures (IFF ones), it appears that the Workbench allocates color registers at the high-end of the palette. Since, however, PaletteTool restores the palette when it exits, you should be able to return to "normal". Credits/Miscellaneous --------------------- The GUI for PaletteTool was developed using Jan van den Baards' wonderful GadToolsBox. Window Blender is a fantastic 3.0/AGA graphics program written by Fred Mitchell. PublicScreenX is a marvelous public screen manager written by Steve Tibbett. Thanks to the KreuzerSoft support team. Thanks to the Nations Capital Amiga Users Group (NCUAG). Thanks to Commodore for the Amiga, and to Jan van den Baard for making the development of GUI's on the Amiga child's play. Thanks to Commodore for (finally) releasing the 3.0 Includes and Libraries! >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< >> Please let me know if you have any problems/suggestions/comments/etc. << >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< I can be reached at T.KREUZER on GEnie, or via regular mail at: 6711A N. Washington Blvd. Arlington, VA 22213 Legal Section ------------- PaletteTool Version 1.1 Copyright ©1993 by Timothy B. Kreuzer. All rights reserved. PaletteTool is freely redistributable, as long as the following rules are followed: - This doc file must be kept with the executable(s), and must include the above copyright notice. - You may not charge any fee for this program, other than the basic cost of distribution media and/or BBS access. Of course if you want to pursue selling this, feel free drop me a line. Commercial Section ------------------ The following KreuzerSoft projects are (hopefully) available on a BBS near you: Fractal V1.1 - Mandelbrot set program for 3.0/AGA. LyapunovSpace V1.1 - Lyapunov fractal program for 3.0/AGA. Terrain V1.1 - 3-D fractal terrain program for 3.0/AGA. Worm V1.1 - Port of SUN-Unix graphic toy for all Amigas. DLA - Diffusion Limited Aggregation simulation for all Amigas. Jimi - 8-color Jimi Hendrix image for your Workbench. All for the incredibly low, low price of FREE!