In some cases, you may want to define a custom color scheme when auto style is applied. This is useful if you want to use colors schemes as an interactive legend, or if you want to make a color scheme more observable over a basemap.
Depending on your data, custom color schemes can also be used to display expected patterns of visual perceptions. For example, this guide uses Drought Monitoring data to represent exceptional drought conditions based on location data. While default auto style clearly displays differences in data, we can apply our own "fiery" color scheme to visually represent high to low drought areas. This makes it easy to understand the severity of drought conditions.
For Category and Histogram widgets, a default color scheme is applied when Auto style is selected. The widget color scheme that appears varies, depending on your data.
Unzip the template .carto file packaged from "Download resources" of this guide, and import it to your account to create the map. Builder opens with USDM Life Sciences Data as the first and only map layer.
Use the widgets and apply Auto style to view the default color schemes that are applied to your data.
While the widgets clearly visualize differences in data, let's customize the auto style behavior to display custom colors.
The custom auto style option appears under the widget behavior options in Builder. For Category widgets, you can customize the solid fill color of each category of data.
From the WIDGETS pane in Builder, select the Drought Severity widget to edit the details.
From the Behavior options, click the checkbox next to CUSTOM COLORS, which enables you to represent the widget values with custom colors.
A qualitative color scheme is applied.
Click on the default color scheme to open the color picker.
Click each category and apply the following HEX input colors to define a custom color for each category of data.
Category # 5
Notice how Auto style is starting to display a better color scheme for drought data, displaying dark colors for high drought values and light colors for low drought values. The choice of using a fiery color scheme is often visually perceived with dry weather conditions.
For Histogram widgets, you can select a custom color scheme (or apply a custom color set) for histogram data.
Click Auto style from the Drought Conditions (Percent Area) histogram widget.
From the WIDGETS pane, select Drought Conditions (Percent Area) widget to edit the details.
From the Behavior options, click the checkbox next to CUSTOM COLORS, which enables you to represent the widget values with a custom color scheme.
A sequential color scheme is applied.
Click on the default color scheme to open the color scheme picker.
Modify the number of buckets to
5 and keep the default the classification method to group data (to be applied when auto style is applied from the widget).
Select a color scheme, or click Custom color set to build your own color scheme from scratch.
Notice how Auto style displays a custom color scheme of drought data, displaying light colors for low percentages and dark colors for high percentages of data.
We would love to hear from you! Was it easy to understand? Do you need more information? Let us know.