I have created a map of a country in QGIS.

  1. How do I color the province individually ?
  2. Is there a quick way to randomly coloring all the province of a country.

I am using the "ne_10m_admin_1_states_provinces" shapefile from Natural Earth.

  1. Layer Styling (right-click - Properties - Symbology, or Layer Styling Panel)
  2. Select "Categorized"
  3. Pick a Value field (Province in your case?)
  4. Color ramp "Random colors"
  5. Click "Classify":

enter image description here

If you want to change colors, click the individual colors and adjust.

| improve this answer | |
  • 1
    Thank you, this was very helpful, I managed to do it1 – LeMoaiVoyageur Apr 15 at 11:19
  • @LeMoaiVoyageur nice. If it solved your problem please accept my answer with the checkbox – BERA Apr 15 at 15:31
  • With pleasure @BERA I have rated your reply using the arrow, and the tick is green. is this what you meant ? – LeMoaiVoyageur Apr 16 at 6:04

I suggest you have a look at 'Topological coloring' which is in the Processing Toolbox. This will create a new field called 'color_id' in the attribute table of the polygon layer that can be used for styling in such a way that adjacent polygons never have the same colour, while using a limited number of colours.

enter image description here

| improve this answer | |
  • Thank you, This is a different way from the one described above by @bera . However how to you create that new filed "color_id" ? Is there a tutorial that could help with that process ? Many thanks again, S – LeMoaiVoyageur Apr 15 at 11:33

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