Colormap files are specified in XML, CLR, CT and CPAL formats. The XML format is the compatible format of ParaView, the CT format is the compatible format of VisIt, the CPAL format is the compatible format of EnSight and while the CLR is the compatible one of the Surfer software product from Golden Software and the ArcGIS software product from ESRI. Both formats require a minimum set of parameters: X and RGB, where X specifies elevation (or other attribute range space) and RGB specifies a color to be used at a certain elevation or attribute value indicated by the corresponding X.
Below is a sample XML colormap file (gmtglobe.xml on Samples/colormaps). This is formed by the following:
Note that the values of X and RGB can contain decimals. Also, alpha component is optional, i.e. it can be defined, but its not necessary.
Below is a sample CLR colormap file (LandSea.clr in Samples/colormaps). This is formed by the following:
It is not indicated on the sample illustration file, but note that the values of X and RGB can contain decimals. When the colormap is applied, values falling between the specified X range are derived using linear interpolation from nearest values. The value of X specified in the colormap file is a nominal generic range, i.e. 0-1, and is mapped to actual data range during software operations. Actual data range is not specified within the colormap file.
Sharp boundaries in the colormap can be created by specifying regions as pairs with the same color value, and joining them up with very close X values. For example in Samples/colormaps/BandedRelief.xml,
x="0.300" r="0.792" g="0.557" b="0" (first solid color band) x="0.399" r="0.792" g="0.557" b="0" x="0.400" r="0.62" g="0.486" b="0.024" (second solid color band) x="0.499" r="0.62" g="0.486" b="0.024"
Example of ArcGIS variant of CLR colormap file format is arcgis_LandSea.clr in Samples/colormaps). This file format is formed by the following:
While in Surfer variant its not necessary to define all 256 values, in case of ArcGIS CLR colormap files user has to define all 256 values. Otherwise, for values where color is not defined, black is used. Alpha component is optional, i.e. it can be defined, but its not necessary.
Example of VisIt colormap file format is Pastel1.ct in Samples/colormaps). This file format is XML document with key tags:
Alpha component(4th part of the color) is optional, i.e. it can be defined, but its not necessary.
Example of EnSight colormap file format is ensight1.cpal in Samples/colormaps). This file format is formed by the following:
Colors defined in this colormap file format are defined on set of N equidistant points. Alpha component is optional, i.e. it can be defined, but its not necessary.
Full Look-up-table (LUT) type formats can be emulated using the XML format, by using 255 entries where X ranges from 0.0 to 1.0 in steps of 1/255 . This will have the effect of eliminating most linear interpolation artefacts, if any would otherwise be present.