Assign different colours to layers in QGIS

Let's assume that you want to set different colours to a layer in QGIS depending on multiple values.

For example, let's assume that you have the following map:

Catalonia

Now, let's suppose that you want to set different colours for the municipalities depending on different states:

  • A (red)
  • B (orange)
  • C (green)

Right-click on the layer and go to properties:

Properties

At this point, select the Symbology category and choose a value from the attribute table. In this case, we are selecting estat_pas:

  • Planificat -> Red
  • En Estudi -> Orange
  • Connectat -> Green

Notice that you can mark each status with a label (A, B, C). Apply the changes and you'll see the final result:

Map with multiple states

As you can see, not the whole map is painted because the blank spots have a different state than A, B or C.

Hi, I'm Erik, an engineer from Barcelona.

If you like the post, say hi or join Substack to get non-frequent updates.