Supported formats
A fly gradient-mapped with Spectral 08
The gradients on cpt-city are usually available in each of the following file formats:
- Colour palette tables for use with the Generic Mapping Tools, GMT (cpt)
- CSS3 gradients (c3g)
- Gradients for the GNU image manipulation program, GIMP (ggr)
- Gnuplot palette files (gpf)
- POV-Ray colour map headers (inc)
- Tecplot colour-maps (map)
- Colour-maps used by PostGIS, in particular those for the ST_ColorMap function. It should also be possible to use the maps in the GDAL program gdaldem, the GRASS r.colors utility and in ESRI products which call for a HDR color table (pg)
- PaintShop Pro's native format (having the extension PspGradient), which can also be read by Photoshop (psp)
- QGIS style colour-ramps (qgs)
- The SAO format used by the astronomical image viewer, DS9 (sao)
- Scalar vector graphics gradients (svg)
Conversion to some formats is possible with the cptutils package of Unix command-line programs, and an online version is also available.
Some of the gradients in the archive have an alpha channel (transparency, opacity) and this will be present in all of the formats which support it. For those that do not (cpt, gpt, sao) the transparency will be replaced by an appropriate colour: this is indicated by αB for black, αW for white and so on.
There are some gradients which have not (or cannot) be translated to some formats. The main restrictions are:
- GMT colour palettes (cpt) can have levels painted by a bitmap (hatchure) which cannot sensibly be converted to other formats
- GMT colour palette (cpt) and GIMP gradient (ggr) files support non-RGB colour models. These are not yet converted to the other formats.
Some of the POV-Ray colour-map (inc) files available on cpt-city
contain more than 256 colours; the limit for current versions of the
POV-Ray software. If you want to use a larger palette then you'll
need to increase the value of MAX_BLEND_MAP_ENTRIES
in
source/frame.h
in the POV-Ray sources and recompile it.
Note that POV-Ray imposes
restrictions
on the distribution of modified sources.
Photoshop can only handle 56 levels in a psp file and will truncate larger files. Likwise, Tecplot limits the number of stops in a map file to 50.
The psp, inc and map files which are too large for their programs have the links to the files greyed out: the files are there, but probably won't work.
Other gradient formats may be added at a later date, although only formats which are fully open (and reasonably documented) will be considered for inclusion.
Further information on gradients can be found on the software links page.