Varying the color of symbols along a color scheme is a good way to indicate quantitative variations of an attribute. For example, point symbols representing observation stations can be colored along a diverging red-blue color scheme to show relative temperature recordings. Variations in color of line symbols representing roads can indicate traffic volume or speed.
The simplest way to vary symbol color is to set the layer symbology to one of the color-based layer symbology options. Unique values assigns a different color to unique instances of the specified attribute field. You can customize this by modifying each symbol and adding to, combining, or removing values. Graduated colors classifies qualitative differences with a discrete number of symbol colors. Unclassed colors shows variation in a feature attribute by distributing a color scheme evenly across features. Or, you can refine one of the size-based layer symbology options by setting the color variable to a field or an expression. In addition, you can control the color of symbol layer properties by connecting them to a field of hexadecimal color values. While theoretically you can use more than one of these approaches together on a single layer, be aware that the result may be too complex to be understandable. Use these techniques judiciously.
Set the color variable to a field or an expression
When a layer is symbolized with single symbol, unique values, graduated symbols, or proportional symbology, you can also vary the color of the symbols. You can set the color variable to a numeric attribute field or write an expression. The attribute can be the same or different than the one used by the layer symbology. Choose a color scheme to apply to the range of values.
For example, a layer of points representing earthquakes drawn with graduated symbols shows classified circles sized relative to the earthquake's magnitude. The color variable set to a numeric field indicating damage displays the degree of damage for each circle based on colors along a specified color scheme.
When working with the color variable on polygon features, the color is applied to the template (point) symbol, not the background (polygon) symbol.
To set the color variable to a field or an expression, complete the following steps:
- Select the feature layer in the Contents pane.
- On the Appearance tab, in the Drawing group, click Symbology .
- In the Symbology pane, on the Vary symbology by attribute tab , expand the Color heading.
- Choose a numeric field from the Field menu to vary the color.
- Write an expression to determine color values. Choose <expression> from the Field menu, or click the Set an expression button to open the Expression Builder dialog box. Write an expression and click Verify to validate it. Note that although an expression is valid, it may not return a valid numeric value for the color variable. You can filter the Expression Builder dialog box to show only numeric fields to help prevent this.
- Optionally choose a Normalization field. Normalization is not available when the color variable is set to an expression.
- Select a color scheme.
When symbolizing polygon feature layers, you can modify the color of the polygon symbol fills or outlines (or both) by the color scheme. Click the Color scheme options button to choose the target for the color scheme. The target determines which symbol layers (fill symbol layers and stroke symbol layers) of the symbol are affected. Symbol layers that are color locked are not updated by changes to the color scheme regardless of the color scheme target setting.
- Optionally adjust the histogram values.
If the source data has changed or been updated, click Refresh values to update the range of values.
- Check the Show legend check box to add a representation of the color variation to the layer's legend in both the Contents pane and any legends placed on layouts.
- To remove the color variable or the normalization field, choose <none> from the Field or Normalization menus.
- Expressions are not saved by the layer if you change the color variable to read from a field instead of an expression. You can save the expression from the Expression Builder dialog box by clicking Export before making changes.
- If you share a point feature layer that uses a color variable, be aware that any point symbol other than a simple circle or square will be downgraded to a circle in the resulting web map.