Khroma icon Khroma Reference (version 2.3)


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 was initially intended to be 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), Visor Prism (OS 3.5.2) and Palm 515 (OS 4.1) 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 into a 'color scheme' database, reloaded and edited. The UIColorTableEntries tags and associated color values (indexes into the system color table and rgb values) can be displayed and exported 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. While KhromaQC's editing features are minimal (scheme names and categories only), Khroma and its full editing capabilities can be accessed with a button tap. KhromaQC can be launched from Khroma with a menu item in the Khroma's 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. Transparency is provided by including an icon or bitmap family resource instead of a single icon or bitmap with the transparent flag set and the transparent color set to the icon's background color. This is a quick relink. 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.

The "right thing to do" 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 doing the following: 1) In Khroma, remove any active color table by selecting the 'Restore Defaults' menu item. 2) In Khroma's preference dialog, make sure the 'Startup with:' preferences option is set to 'Table'. 3) In the other program, select the desired color scheme (or theme!). 4) Relaunce 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 color picker. If Khroma's popup picker is being used (the default) tap the popup 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. Alternatively, the native PalmOS color pickers may be used by setting the appropriate options in the preferences dialog. 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 Menu:

<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 current 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 current> If the current scheme has been saved into the database, this completely removes it from the database. (No b/u).
<File:Delete...> brings up a dialog which allows multiple schemes to be deleted in a single session.

Scheme Menu:

<Scheme:Activate Scheme> Installs a UIColorTable for the current screen depth using the current schemes colors. This makes the schemes colors available system wide.
<Scheme:Restore Defaults> 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.
<Scheme:Load Active Color Table> Loads the colors from UIColorTable for the current depth into the current Khroma scheme. If the table was installed by Khroma, the scheme database is searched and the associated scheme is made current. If was not installed by Khroma, the colors are loaded into a new scheme.

<Scheme:Auto Scheme...> Opens a dialog which allows various Auto Scheme parameters to be set and previewed. A description of the parameters is provided by tapping the "i" button in the dialog title bar.
<Scheme:Details...> If the current scheme has been saved into the database, a dialog posted which allows it's name a category to be edited.
<Scheme: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 Menu:

<Options:Goto QuickChange> launches KhromaQC.
<Options: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).
<Options:Icon Transparency...> Brings up a dialog in which the transparency of RAM application icons can be edited. Instructions for using the dialog are available by tapping the "i" button in the dialog's title bar.

<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 button.

Navigation/Tool bar:

Nav-Toolbar

This software is freeware. Use it, give it to your friends, but please do not sell it. 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 2003