I am working with a shapefile layer of the world. All the countries are in the Attribute table each one in a different row. I tried to make each polygon in a different color so the countries will be in a different color, but it did not work.enter image description here

In the Africa map I save each polygon separately and upload into a new QGIS. This method takes a lot of time. What would a better and faster method be?

enter image description here

  • 3
    While it's possible to generate 260+ discrete colors, the ability to distinguish the differences is highly questionable, even among a population without color-blind individuals. You might benefit from research into the four color theorem and reading the QGIS documentation on thematic mapping.
    – Vince
    May 20, 2017 at 11:57

1 Answer 1


You may right-click on the layer in the Layers Panel and go to Properties >> Style dialog.

Then, choose Categorized, set the field that stores the name of the countries and click the Classify button:

enter image description here

Finally, click the Apply button for applying the changes and you will see this:

enter image description here

  • 1
    Good one! Didn't know this feature
    – Adam Matan
    May 25, 2017 at 17:32
  • 1
    @AdamMatan, really easy to use, but very effective at the same time!
    – mgri
    May 25, 2017 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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