I recently looked at some other posts relating to this topic but as far as I can tell there is currently not a working plugin or script for QGIS 2.0 to achieve a four color theorem for styling polygon vector data (it doesn't necessarily have to be 4 colors, just so that each neighboring polygon is a different color, though keeping it at a minimum number of 4-6 colors would be elegant).

  • update: I was able to use the "color map" plug-in with the prior version of QGIS 1.8, though it would be helpful to have an updated version of this plug-in for QGIS 2.0 – clhenrick Mar 8 '14 at 17:44

Use the TopoColour plugin, which is already compatible with QGIS 2.x but is not yet available in the official repository:


Download the zip file and unzip it in the QGIS plugin directory:

  • Linux: ~/.qgis2/python/plugins
  • Windows: C:\Users\{username}\.qgis2\python\plugins
| improve this answer | |

I know that the question is about QGIS 2 but I'll add the answer for QGIS 3 because I kept coming back to question while looking for it.

It is now natively supported in QGIS 3.

  • View → Panels → Processing Toolbox
  • Select Topological coloring
  • Set parameters as preferred. Run.
  • This will create a new layer with an additional color_id column but still the same color.
  • Edit the properties of the new layer, Symbology section.
  • At the top, drop down to select Categorized.
  • Define the column as color_id.
  • Select your color scheme.
  • Click Classify to create the categories and assign them the colors.
| improve this answer | |

Alternatively, pick up the new Map Coloring plugin. You need to enable experimental plugins in the Plugin manager to get it, and look for Coloring a map in the manager. For some strange reasons, you get a blank icon, so use Plugins -> Map Coloring -> Map Coloring from the menu.

The output looks like this, after switching to Categorized styling on the COLORID field:

enter image description here

| improve this answer | |

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.