Colours are the deeds of light; its deeds and sufferings: thus considered we may expect from them some explanation respecting light itself.
The GMT package implements colour gradients with the cpt (colour palette) file format, and provides some tools for creating and manipulating them. The cptutils package contains a number of additional utilities, mostly for translation to and from other formats.
The cptutils package was written to aid the construction of the cpt archive cpt-city (where thousands of gradients can be downloaded). The Unix source distribution for version 1.74 of the package can be downloaded here (you will need to have libxml2 and libpng installed to compile it).
Packages for a number of Linux and BSD distributions are available; see the repology site for details.
An online conversion tool based on cptutils can be found at cptutils-online.