Danny Epstein wrote:

> "Jason Davidson" <[EMAIL PROTECTED]> wrote in message
> news:14340@palm-dev-forum...
> > I understand that Palms default color palette is a 216-color web palette.
>
> The first 216 colors in the standard palette are the 6x6x6 grid of colors
> with the following coordinates:
>
> 0x00, 0x33, 0x66, 0x99, 0xCC, 0xFF
>
> They aren't arranged in any obvious pattern. There are other colors in the
> standard palette, including a bunch of grays.

I have a document titled "PalmOS35ColorAPI.pdf"
I have no clue where I obtained it.  It says the following:

Palette
The system palette is resource based, but in general should be
treated as fixed as follows:
� 1-bit: white (0) and black (1)
� 2-bit: white (0), light gray (1), dark gray (2), and black (3)
� 4-bit: 16 shades of gray, from white (0) to black (0xF)
� 8-bit: 216 color �Web-safe� palette, which includes all
combinations of red, green, and blue at these levels: 0x00,
0x33, 0x66, 0x99, 0xCC, and 0xFF. Also, it includes all 16 gray
shades at these levels: 0x00, 0x11, 0x22, ... 0xFF. Finally, it
includes these extra HTML colors: 0xC0C0C0 (silver),
0x808080 (gray), 0x800000 (maroon), 0x800080 (purple),
0x008000 (green), and 0x008080 (teal). The remaining 24
entries (indexes 0xE7 through 0xFE) are unspecified and
filled with black. (On debug ROMs they are filled with
random colors to help developers notice if they use an
invalid value.)
Only certain entries in the 8-bit palette are used by the system for
the user interface. Developers can use other entries for application
specific colors. Developers need to know which entries are available
in the palette for their own use.
One way to find out the indexes that the OS is using is to loop
through the UI color table, calling UIColorGetTableEntryIndex
for each slot, and keep a list (excluding duplicates.) To get the RGB
values of the colors, do the same thing but call
UIColorGetTableEntryRGB.



--
Adam Wozniak                     Senior Software Design Engineer
                                 Surveyor Corporation
[EMAIL PROTECTED]                4548 Broad Street
[EMAIL PROTECTED]          San Luis Obispo, CA 93401



--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to