[GIS] QGIS color map format

colormappingqgis

What is the correct color map format (.txt) for a color map I want to load in the Raster Layer Properties/Symbology menu of QGIS (v. 3.6.0)

Best Answer

It looks like this:

# QGIS Generated Color Map Export File
INTERPOLATION:INTERPOLATED
427.153,68,1,84,255,427.2
2092.85,253,231,37,255,2093
  1. Line is something like a Headline. I guess you can type almost everything there... (not 100% sure tho)
  2. Line is the interpolation Method you want to use. e.g. INTERPOLATED means Linear and DISCRETE means Discrete.
  3. Line is your first (lowest) class. In this example 427.153 is the minimum value, 68 is Red value, 1 is Green value, 84 is Blue value, 255 is Alpha value, 427.2 is the label.
  4. Line is your second class
  5. Line your third class

and so on... Tip: just try it out by saving it to a text file and watch the differences.