[GIS] Importing color ramp into QGIS 3.10

color rampqgis

I would like to use a set of color ramps that are available at CPT-CITY but cannot find any way to import the downloaded files.

Note that I have found the Catalog: cpt-city option under the Create New Color Ramp selection. However, the ramps that I'm interested are not found in this collection.

Is there some way to simply browse to the file that I'm interested in to register it with my QGIS project?

Best Answer

The solution proposed by @Xi Jin is available for raster layers only and is for color maps, not color ramps. Even though very similar, the concepts are different: a color map assigns pre-defined colors (could be a color ramp) to certain values (numbers or classes) - like assigning elevation data to a topographic color ramp: 0 to 200 m: green; 200 to 500 m: yellow; 500 to 1000 m: brown; over 1000 m: white. Thus color maps are a more narrow concept: color ramp are just ordered gradients of colors, without assigning actual values: green, yellow, brown, white. See also here for color maps: https://pvanb.wordpress.com/2014/02/05/creating-a-qgis-color-map-from-text-file/

The standard way to import color ramps from a file or a URL is using Menu Settings / Style Manager, where you have a button to import/export files - see documentation for Style Manager. The color ramps you add in this way will permanently be available everywhere in QGIS.

enter image description here

If you want to create your own color ramps, click the green + symbol. You can add a Name and Tag(s) for the color ramps created to be easier to find/identify them when you have a lot of color ramps.

Color ramps created in this way can be exported (to share) again with the button on the left.

For all color ramps you create or import, set the checkbox Add to favorites for those color ramps that you want to be added to favorites. They will be immediately visible in the drop down list when selecting color ramps - all others are hidden behind All Color Ramps:

enter image description here

Assigning names and tags helps you to keep an overview of your color ramps and other styles.

By the way, the style managar can be used in the same way for other styles like composed styles for vector layers (points, lines, polygons), for texts/labels, legend symbos and 3D symbols. So it is a powerful tool to create and administrate everything connected with styles.