Currently in the client I have an array of colors that is looped through for a given set of geometry features. Features are grouped together on the map and each group has a color assigned to it. It is not taking into account adjacent group polygons such that two adjacent groups may have the same color if the array of groups is longer than the color array.

Is there a simple way to assign colors such that no two adjacent groups have the same color?


1 Answer 1


This might be useful source for your color library:


You can explore color based on the number of your data classes, the nature of your data (if it's sequential, divergive, qualitative), and choose between single/multi-hue color scheme.

  • 1
    I appreciate the resource. I'm actually looking for a simple way to programmatically apply the 4-color theorem when assigning colors based on spatial queries or in QGIS.
    – Don
    Jun 28, 2017 at 16:57

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.