Appendix D: Palette Files

Palette File Format

Palette files can contain any number of palettes. When SatView reads a palette file, each palette in the file is added to the list of palettes available via the Color Palette menu of the Miscellaneous Properties panel. As of this writing, si_palette is the only utility that produces palette files, and SatView is the only program that reads them. However, since they are ascii files, they can be written or edited by hand. The format for a single palette description is:

Line 1: The 5-character ID string. It must be "SP92a".
Line 2: The name of the palette as it will appear in the menu, any length.
Line 3: The number of colors in the palette. For SatView, this number must always be 30.
Line 4: A palette-type indicator. It should always be 0.
Remaining Lines:

RGB (red, green, blue) triplets describe the colors of the palette. There must be one such triplet for each color specified on Line 3. Each member of the triplet must be a value between 0 and 1. 1 is full intensity for that component.

Sample Palette Description:

SP92a
HiSatBlueRed
30
0
0.0000 0.0000 0.9961
0.0000 0.1328 0.9961
0.0000 0.2656 0.9961
0.0000 0.3984 0.9961
0.0000 0.5312 0.9961
0.0000 0.6641 0.9961
0.0000 0.7969 0.9961
0.0000 0.9297 0.9961
0.0000 0.9961 0.9297
0.0000 0.9961 0.7969
0.0000 0.9961 0.6641
0.0000 0.9961 0.5312
0.0000 0.9961 0.3984
0.0000 0.9961 0.2656
0.0000 0.9961 0.1328
0.0000 0.9961 0.0000
0.1328 0.9961 0.0000
0.2656 0.9961 0.0000
0.3984 0.9961 0.0000
0.5312 0.9961 0.0000
0.6641 0.9961 0.0000
0.7969 0.9961 0.0000
0.9297 0.9961 0.0000
0.9961 0.9297 0.0000
0.9961 0.7969 0.0000
0.9961 0.6641 0.0000
0.9961 0.5312 0.0000
0.9961 0.3984 0.0000
0.9961 0.2656 0.0000
0.9961 0.1328 0.0000

Any number of palette definitions may appear in a palette file. There should be no empty lines between them. It is important that the number of RGB triplets corresponds to the value on Line 3.