Khroma icon Khroma Reference (v1.1)


INTRO AND SYSTEM REQUIREMENTS

Khroma is a full-featured UIColorTable editing application which allows interactive selection of colors for the PalmOS user interface. KhromaQC is a small-footprint application that allows changing color schemes and display depths with single click. Khroma is intended primarily as a developer's tool but can be used by anyone who wants to add a bit of color to the basic palm applications and other monochrome programs on color handhelds. Khroma and KhromaQC only run under PalmOS 3.5 or higher and preferably on color handhelds or emulators. Grayscale devices using OS 3.5 or above are supported but useful grayscale schemes are understandably limited. Khroma has been tested extensively under IIIc emulation (OS 3.5 and 4.0), m505 emulation (OS 4.1), OS 5.0 simulation and Palm Vx (OS 3.5) and Visor Prism (OS 3.5.2) hardware. Other similar handhelds running these OS versions should work fine but have not been specifically tested.

OVERVIEW

Khroma works with the UIColorTable and UIColorTableEntries list APIs introduced with the IIIc and OS v3.5. Colors are selected using small popup palettes for each color item. Once colors have been selected they can be saved as a 'color scheme', reloaded and edited. The UIColorTableEntries tags and associated color values (index into system table and rgb values) can be displayed and exported (currently only into the Memo database). Memos in the Khroma format can be imported into a scheme. Exporting and importing via memos allows schemes to be edited, copied, beamed and shared like other memo records. A color scheme may be installed as a UIColorTable (technically by writing a 'tclt' resource for the current Khroma screen depth to the system's saved preferences file). This table is used by the system for default colors and will be used in all applications that do not themselves modify the UIColorTable or UIColorTableEntries list. The stock default system colors can be easily restored.

KhromaQC simply acts as a front end to the scheme database installing schemes from the database and allowing screen depth changes with a single click. Khroma and its editing capabilities can be accessed from KhromaQC via a pushbutton. KhromaQC can be launched from Khroma with a menu item in the Options menu.

PROGRAM COMPATIBILITY

In general, any program which does not install its own UIColorTable or write its own colors to the UIColorTableEntries list should work well with utilities like Khroma. Some caveats apply, however. 1) Icons or bitmaps are sometimes used as specialized interface components. Regardless of the shape of the icon or bitmaps's image, it is created as a rectangular structure. The unused 'background' pixels of the rectangle are usually colored white and are opaque to any background color by default. Such icons operate fine with colored backgrounds but look clunky if not ugly. The fix is to provide an icon or bitmap family instead of a single icon or bitmap. Set the transparent flag and set the transparent color to the icon's background color. This is a quick recompile and really improves the interface appearance. 2) Games are notorious for working close to the hardware when rendering their graphics. Although I have only been told of one game which conflicted (Zap2000) I would be very surprised if many games worked well with Khroma. 3) The Palm's Launcher works very nicely with Khroma. Icons without transparency may not look great but there are utilities (such as the icon transparency plug-in for Launch'Em) which will fix some of these. Other launchers which colorize themselves, in particular MegaLauncherII and Launch'Em, don't use many if any of the default system colors.

My preference would be for programs to give users the option of using either a color set provided in code or the default system colors. This would be simple to implement and would be very user friendly. Utilities like Khroma could then be used to create a coherent 'look and feel' across all applications on an individual device. Unfortunately this is not frequently not the case.

Several other programs are available with similar functionality as Khroma. Schemes created in these programs can be added to the Khroma database by setting the color scheme (or theme!) in the other program and launching Khroma. Khroma will startup with a new, unsaved scheme filled in with the colors selected in alternate program. Select the <File:SaveAs...> menu item to add the colors to the Khroma database.

INTERFACE

Color Selection

The active color assignments are displayed as color 'chips'. Tap a color chip to activate a popup color palette. Tap just once and it will remain open until a second tap. Tap and drag to select a color. The current color selection and its values are displayed in the swatch along the palette bottom. Tapping or dragging outside the palette cancels, leaving the active color unchanged. The chip labels are abbreviated versions of the full UIColorTableEntries tags shortened to fit - hopefully they are decipherable. In any case, the full tag names are displayed with the associated color index and rgb values by selecting the <Options:Display color data> menu item.

Tabs and UI Element Groups

The tabs allow navigation between various groups of interface elements. Because the form and menu entries are in a sense ubiquitous they are always available above the tabs. When appropriate, demo elements are included to check out how the colors look. The tab labels are abbreviations of Palm's basic groupings: Obj(Objects), Fld(Fields), Dlg(Dialogs), and 2 of my own: Win(Windows), Oth(Others).

Menus

File:

<File:New> starts a new color scheme using stock system colors (black&white or blue&white).
<File:Open> brings up a dialog for selection of saved color schemes.
<File:Save> writes any changes in the active scheme to the database.
<File:SaveAs> prompts for a color scheme name and saves the active scheme in the database under this name.
<File:Revert> restores the last saved color set discarding any changes to the scheme.
<File:Export...> exports the UIColorTableEntries list and associated color data to a memo record. The memo name may be edited before export. The dialog stays open until the <Done> button is pushed so any number of schemes can be sequentially exported during one session with the dialog.
<File:Import...> imports color data stored in a memo (formatted appropriately) into a scheme. As with exporting, sequential memos can be imported during one dialog session.
<File:Delete> Completely deletes the active scheme from the database. (No b/u).

System:

<System:Set screen depth...> Allows the current screen depth to be changed and optionally used as the system default. (If the <Remember depth> option in the preferences filed is checked, the current depth will be used when Khroma is restarted regardless of the system default depth).
<System:Install UIColorTable> Sets up UIColorTable for the current screen depth using the active schemes colors. This makes the schemes colors available system wide.
<System:RemoveUIColorTable> does just that. It removes the 'tclt' resource so that the original system colors will be used ( Black and white on grayscale machines, mostly blue and white on color). This only removes the color table installed for the current Khroma screen depth.
<System:Load system defaults> loads the colors from UIColorTable for the current depth into the active Khroma scheme. If the table was installed by Khroma, the associated scheme is opened from the scheme database. If was not installed by Khroma, the colors are loaded only.

Options

<Options:Quick Change> transfers you to KhromaQC.
<Options:Display color data> displays the UIColorTable Entries tags and corresponding color index and rgb values in a dialog. A button is provided to export to a memo.
<Options:Preferences> brings up the preferences dialog! The available preferences settings are: <Options:About Khroma...> brings up a dialog with some useful info including most of this text under the info icon.

This software is freeware. Use it, give it to your friends, cuss at it but please do not sell it. I will support it to the best of my ability but my ability may vary with the life's vicissitudes. I always welcome constructive criticism and suggestions and am happy to provide source code for the curious.

Béla B. Hackman
bbhack@wspice.com
March 2001, May 2001, January 2003