How do I add random colors to polygons?

You may find yourself with a number of polygons that you want to differentiate individually rather than grouping. To do this, we recommend using a randomized Fill Color expression. Detailed steps are below.

Set up Dimension and Boundary

Set up Dimension and Boundary

Add your Dimension and Boundary; you should see your polygons with a black fill color (or other fill color, if you have an expression set up already).

Edit Fill Color expression

Edit Fill Color expression

Add the following to your Fill Color expression:

=rgb(round(Rand()*255),
	  round(Rand()*255),
	  round(Rand()*255))

Results

Results

Now your polygons are differentiated individually by color and can are much easier to distinguish visually.