The Color dialog makes it easy to automatically apply a thematic format to a drawing that colors each adjacent area using a different color.
When applied to a drawing that contains adjacent areas, the Color dialog will add an integer field called Color to the table. (If a field exists that is already named Color the system will create the new field using a name like Color2). The drawing is then examined using Manifold's internal graph theoretic algorithms to assign a small number to each area in the Color field so that no two adjacent areas have the same value in their Color field.
The Color field is then used in a thematic format to specify both foreground and background color. The colors used are made slightly darker in the foreground color so that the borders of area styles will be distinct.
|
Scope |
[All Objects] by default, but the selection or any saved selection can be used. |
|
Save to |
<New Column> is the default, to create a field called Color or similar in naming sequence to which color codes separating adjacent areas by color are written. Existing fields may also be used. |
|
Assume areas do not overlap |
Allows a faster spatial computation if checked. If not checked, Manifold will launch an exhaustive computation to resolve possible overlap ambiguities and take much longer. |
|
Modify formatting |
If checked (the default) will modify formatting so that adjacent areas are colored differently. If not checked, correct color codes will still be computed and saved to the table. Formatting can then be changed manually. as desired. |
Example
We've imported a drawing of 2073 census bureau blocks in the San Francisco area. The screen shots below show a detail of the map zoomed into the city of San Francisco itself.

Seen default colors the areas are all gray. We would like to color them so that no two adjacent areas share the same color.
To do so, we launch the Color dialog from the Drawing menu. We use the default options with <New Column> in the Save to box and press OK.

After time for processing (there are over 2000 areas in the example) the drawing appears with new colors as seen above. No two adjacent areas share the same color.
![]()
The Color dialog creates a thematic format for both the background color as well as the foreground color. The foreground color theme is a darker version of the background color with the expectation that an area style using foreground color for apparent boundary is being used.

If we open the drawing's table we can see that a new field, called Color, has been added to the table. This field contains the value 0, 1, 2, 3, or 4. The field is then used in the thematic format to color the drawing.

It's easy to change the color scheme after applying the color dialog. Simply click on the color well to be changed for areas and choose theme and then apply one of the preset color schemes. The color applied by the color dialog is simply a thematic format using the Color field with a Unique Values method.

If we apply the Savannah thematic palette preset and then manually change a few colors (by clicking into the color wells and choosing the color we want) we get the results seen above. To create this illustration we changed the foreground color for areas to a dark gray.

If we apply the Greens color preset we get the illustration above. If we don't like any of the color choices in the presets we can double-click into the color wells in the thematic format dialog and change them to whatever we like.

For example, we can double click into one of the color wells assigned by the Greens preset and change it to yellow.

The result will be a change in that color throughout the drawing.
The above examples show alteration of the colors assigned by the color dialog. Using analogous methods in the thematic formatting dialog we could change area styles as well.
Performance
Theoretically, one can color a map using no more than four colors. The Color dialog engine will try to use only four colors when reasonably possible. However, the algorithm will use five colors to color the drawing in certain complex area relationships if it determines that solving the four-color problem will take an unreasonably long time. Solving the five-color problem requires much less computation time than finding a solution using only four colors.
The Color dialog works by creating an internal graph-theoretic model of the spatial adjacency relationships between areas. It then applies the Manifold coloring function to find a solution for the coloring of the graph and assigns color codes to areas. Because the algorithm is precise and correctly deals with sophisticated topological issues such as possibly branched areas, computation can be very intensive when many areas are involved. Don't expect to color over 3000 counties in the US in a matter of seconds.
Depending on the speed of the machine involved and the number of areas involved, the Color dialog can take a long time to do its job. Coloring 2073 census block areas in the San Francisco Bay area to create the map used in this example required 21 minutes on a 1 gigahertz Athlon running Windows 2000. On the same machine, the 38 areas representing provinces in our example Mexico map were colored in less than a second.
The census blocks were taken from boundary files downloaded from the Census Bureau's web site. The blocks for all California were imported and then all blocks except those in the area of interest were deleted.