I have a txt file added like a layer to QGIS 3.4.2. File number 1. It is an attribute table.

I have a shapefile (a map) added to QGIS 3.4.2. This shapefile has all the countries of the world.

Both files are joined by a key field.

In the file number 1 I have a list of countries:

Key file - Name country - Color

1 - Canada - #000000 2 - US - #FFCC00

How can I change the background of all the countries of the map with the field "color" of every country?


Open symbology tab of your layer and select data defined override at fill color, as field type choose your color field.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.