RAS_PALETTE(5NCARG) | NCAR GRAPHICS | RAS_PALETTE(5NCARG) |
ras_palette - format descriptions for palette files for NCAR View
palette_file.pal palette_file.txt
NCAR View supports a binary as well as a textual format for color palettes.
The binary format is compatible with NCSA HDF and must have a file extension of ".pal". The palette has a red, a green, and a blue table, each with 256 single unsigned byte entries. A 0 represents no intensity for a given color, and a 255 full intensity. In the file, the palette is stored as:
R0 R1 ... R255 G0 G1 ... G255 B0 B1 ... B255
for a total of 768 bytes.
The textual format can be created by a program or manually with a text editor. It provides for 256 RGB entries but also allows for a sparse color table. In the latter case, missing values are calculated from those provided using linear interpolation. If unspecified, the 0 entry defaults to black and the 255 entry to white. Each color palette entry has the following format:
index_number red green blue
where index_number, red, green, and blue are all integers in the range 0 to 255.
All of the examples below deal with textual color palettes.
0 0 0 0
255 255 255 255
0 0 0 0 255 255 255 255
0 0 0 0 1 0 0 255 255 255 0 0
rasview(1NCARG),rascat(1NCARG),rasgetpal(1NCARG), rassplit(1NCARG),rasls(1NCARG),ras_formats(5NCARG)
Color palettes are only useful with indexed-color imagery.
Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
January 1993 | NCARG |