Color scales are an important [[channel]] for visual encoding of [[mark]].
Types of color scales include
- **Sequential**: varies lightness or saturation along gradient. Use with continuous data.
- **Categorical**: varies hue without a discernable pattern. Use with [[categorical]] data.
- **Diverging**: varies both hue and lightness/saturation. Use with [[ordinal]], [[interval scale]], or [[ratio scale]] data like temperature. Ensure the center of the scale is mapped correctly to the median or "true zero" of the data.
Good color choices for sequential or diverging color scales should reflect these principles.
- **Perceptually linear**: the difference in color should be perceptually related to the difference between data. Use [[CIELAB]] to create perceptually linear color scales.
- **Naturally ordered**: humans perceive dark or opaque as "more", so color choices should reflect this human perception.
- **Monotone lightness**: avoid rainbow color scales for continuous data as the lightness is not monotone, which creates the perception of arbitrary distinctions that aren't true to the data.
For categorical encodings, color choices should be distinct, semantically meaningful (e.g., use red for hot), and roughly equally salient (e.g., avoid "extreme" colors like bright red in an otherwise muted color scale).
Note that colors are harder to distinguish as marks get smaller, so use more distinct hues or saturation when marks are smaller for the same differences.
Tools that can be used to create custom color scales include:
- ColorBrewer
- Color Crafter
- Colorgorical
- CCC Tool