Skip to main content
18 votes
Accepted

Setting different colors based on value when labeling using QGIS

If you right-click your layer and go to: Properties > Labels Use the Show labels for this layer option, select the field to label with and then click the data-defined button for the Color section ...
Joseph's user avatar
  • 75.9k
18 votes
Accepted

Changing colour of imported SVG icon in QGIS 3.4

You can simply do it directly in QGIS via Layer Properties > Draw Effects > Effect Properties. Open your SVG Layer Properties and click Draw Effects and then open the Star symbol Customize ...
Taras's user avatar
  • 33.2k
15 votes

Changing colour of imported SVG icon in QGIS 3.4

You need to edit the SVG file and replace the fill="#000000" stroke="none" by something like fill="param(fill) #FFF" stroke="param(outline) #000" stroke-width="param(outline-width) 1" the "...
J.R's user avatar
  • 16.4k
14 votes
Accepted

Meaning of grey and yellow/brown colors of buildings in Google Maps?

Orange buildings are "interesting", according to Google. In my experience with areas that I am familiar with, these are buildings that are "popular", as likely determined by how many people visit, ...
Atanas Entchev's user avatar
11 votes

Colouring points in the same colour as their nearest point/polygon from another layer in QGIS

You can use the new overlay expressions, available since QGIS version 3.16, see Visual changelog. By the way: I'm not sure what you mean that you have "a multi-polygon file with polygons and ...
Babel's user avatar
  • 72.2k
11 votes
Accepted

QGIS Python API set label color based on attribute field

Replace spaces in color value to commas. 100 150 0 -> 100,150,0 Or change color_prop.setField("color") into color_prop.setExpressionString("replace(trim(color), ' ', ',')")
Kadir Şahbaz's user avatar
11 votes

Changing polygon color depending on visibility of background map in QGIS

An alternative if you want the symbology to show up correctly in legends and customise more layer settings depending on basemap, is to use style presets and map themes. This will also let you rename ...
she_weeds's user avatar
  • 12.6k
10 votes
Accepted

Reclassifying raster layer with certain colors for value ranges in QGIS?

You may apply a reclassification by right-clicking on the layer in the Layers Panel and then clicking on Properties: from the dialog that appears, go to Style and then set these parameters (you can ...
mgri's user avatar
  • 16.2k
10 votes

Fill color and outline color with the same value

You can use Data defined override. Before categorizing click on change symbol, then choose data defined override for Stroke color and enter the expression @symbol_color. Note that this will not be ...
MrXsquared's user avatar
  • 34.5k
10 votes
Accepted

Adjacent DEM color matching in QGIS?

In the main menu bar, go to Raster | Miscellaneous | Build Virtual Raster and select all the tiles you want to group (don't forget to uncheck the Place each input file into a separate band tickbox). ...
Gabriel's user avatar
  • 3,145
10 votes

Randomising colour for many of polygons in QGIS

To get random colors, but be sure that to neighboring polygons are always in different colors, use Menu Processing / Toolbox / Cartography / Topological coloring (see documentation). Run the tool and ...
Babel's user avatar
  • 72.2k
9 votes

Color Ramp in QGIS

It was not obvious where to look for the predefined templattes, but I figured it out with the help of another question, the credits to this Q&A: Elevation color ramps for DEMs in QGIS This is ...
Marco's user avatar
  • 3,230
9 votes

Filling or splitting polygons proportionally based on variables using QGIS?

How to fill a polygon with stripes where the width of each stripe is proportional to an attribute Build a multi-layered symbol from the bottom up, with layers as follows. Final layer - outline ...
csk's user avatar
  • 24.9k
9 votes

QGIS - How to differently colorize labels from two separate fields using color expression script?

You may be able to use Symbology, rather than Label. (1) Choose Symbology tab and add two layers of Centroid fill with the Font marker type. Give negative offset (e.g. -10.0mm) to red, and positive ...
Kazuhito's user avatar
  • 30.9k
9 votes

Styling contours by colour and by line thickness in QGIS

Step 1 - Configuring the symbology type (only necessary if your contours are polygons) Change the symbology of the fill from "Simple Fill" to "Outline: Simple Line" Step 2 - Stroke ...
TeddyTedTed's user avatar
  • 6,120
9 votes

Styling contours by colour and by line thickness in QGIS

Thanks to the insightful answers and comments I realized that, after applying color by graduated symbols or a color ramp, I could follow the logic suggested by both @Kadir Şahbaz and @TeddyTedTed in ...
Leigh Bettenay's user avatar
9 votes
Accepted

Changing polygon color depending on visibility of background map in QGIS

Use data driven override for Stroke color and paste this expression: case when is_layer_visible ('OpenStreetMap') then 'black' when is_layer_visible ('Google Satellite') then 'white' end Polygon ...
Babel's user avatar
  • 72.2k
8 votes

Removing visual polygon borders in QGIS

The only way to that is to set the border color same as the fill color, then the border will disappear. You can keep setting the border line width is zero. Use 'Pick Color' to select exactly the same ...
ahmadhanb's user avatar
  • 41k
8 votes
Accepted

Using a fixed palette range to plot an NDVI raster in R

You need to supply levelplot() with a bit more information, via its at= argument, so that it can know the set of intervals to which you want the colors in col.regions applied. library(rasterVis) ## ...
Josh O'Brien's user avatar
8 votes
Accepted

How to change raster palette?

Convert your image into GDAL virtual raster http://www.gdal.org/gdal_vrttut.html with gdal_translate. gdal_translate -of vrt test.tif test.vrt GDAL VRT raster is a small XML file than contains ...
user30184's user avatar
  • 66.8k
8 votes
Accepted

Applying one color to many layers in QGIS 3?

Yes, it is possible. In QGIS 3.6, right-click the layer that you want keep its style -> Styles -> Copy style -> Select Symbology Then go to other layer select them all using SHIFT and left-...
ahmadhanb's user avatar
  • 41k
8 votes

Generating random muted/pastel colours using QGIS

In your layer attribute table, create a new text field (min 11 characters length). In your QGIS field calculator, put this expression for update this field : color_hsv( rand(0, 360), -- all hue (0 ...
J. Monticolo's user avatar
  • 15.7k
8 votes
Accepted

Colours for positive and negative values in a raster layer in QGIS

You have a range of values from -0.369288057 to 0.604043365, thus a difference of 0.973331422. You have a color ramp red-white-black and the "middle" value (white) is set to the middle of ...
Babel's user avatar
  • 72.2k
8 votes
Accepted

Setting different font color types from the same field in rule-based labeling in QGIS

It seems unusual to have a case when then in the filter expression of the rule, so I am guessing you have put the expression to get the color there. You can replace the filter to be an ELSE by ...
JGH's user avatar
  • 42.2k
8 votes

Randomising colour for many of polygons in QGIS

Right click the polygon layer in the layers panel and go to properties -> symbology. Choose the categorized renderer from the dropdown menu on the top. As value use $id. Choose random colors as ...
MrXsquared's user avatar
  • 34.5k
8 votes
Accepted

Is there a way, in QGIS, with an expression, to convert a color to hexadecimal value?

There is no direct function to convert from decimal to hex using QGIS expressions afaik. But using some math, you can create an expression that does the job. The following expression works for numbers ...
Babel's user avatar
  • 72.2k
7 votes

Meaning of grey and yellow/brown colors of buildings in Google Maps?

Here's a recent blog post from Google with some information on this: https://maps.googleblog.com/2016/07/discover-action-around-you-with-updated.html We determine “areas of interest” [orange/...
JLP's user avatar
  • 121
7 votes

Setting different colors based on value when labeling using QGIS

If you want to change any more than the color your best bet would be Rule based labeling, though for a single value you are better off using expressions for that specific value as already mentioned. ...
Phil G's user avatar
  • 723
7 votes
Accepted

QGIS coloring layers with same colours

In the style section just choose your other column for the style options but dont reclassify. just click apply and it should work!
Leo's user avatar
  • 952
7 votes
Accepted

How to create a saved, consistently available value/color key when styling a choropleth map in QGIS?

You can save the styling as a QML file. On your second picture click on style at the bottom and save style. If you save this in the same file path with the same name as your shapefile it will ...
Chris Jenner's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible