The UI color list contains the colors used by the various user interface elements. Each UI color is represented by a symbolic color constant. See Table 10.1 for a list of colors used.
Each bit depth has its own list of UI colors, allowing for a different color scheme in monochrome, grayscale, and color modes. This is important because even with a default monochrome look and feel, highlighted field text is black-on-yellow in color and white-on-black in other modes.
To obtain the color list, the system first tries to load it from the synchronized preferences database using the value sysResIDPrefUIColorTableBase
plus the current screen depth. The use of a preference allows for the possibility that individual users could customize the look using a third party "personality" or "themes" editor. If the preference is not defined, it loads the default color table from the system color table resource, using the current screen depth to look up the appropriate table.
Using a list allows easy variation of the colors of UI elements to either personalize the overall color scheme of a given Palm Powered™ device or to adjust it within an application. Defining these as color classes ensures that the user interface elements are consistent with each other.
Table 10.1 UI elements and colors
Should your application need to change the colors used by the UI color list, it can do so with UIColorSetTableEntry()
. If you need to retrieve a color used, it can do so with UIColorGetTableEntryIndex()
or UIColorGetTableEntryRGB()
.
If you change the UI color list, your changes are in effect only while your application is active. The UI color list is reset as soon as control switches to another application. When control switches back to your application, you'll have to call UIColorSetTableEntry()
again.