Parcel maps, election-district maps, and school-boundary maps all have the same small problem. Two adjacent polygons get the same color, and the boundary between them disappears. Fixing that by hand is slow for anything more than a few features. Esri's Polygon Neighbors tool in ArcGIS Pro lists which polygons touch. This script uses that list to make the color decision.

How it works

The script reads the adjacency table from Polygon Neighbors. It sorts the polygons by neighbor count and assigns the polygons with the most neighbors first. That is a standard graph-coloring method. Each polygon gets a Color ID from 1 to 10, and no two polygons that share an edge get the same value. The script adds a Color_ID field to the feature class and fills it.

Where it's useful

It helps on any map where a shared color would hide a boundary. Examples include parcel and zoning maps, election districts, and school attendance boundaries.

View the script on GitHub: buschbrian/colorID.py.