|
| 1 | +## Color usage |
| 2 | + |
| 3 | +When creating data visualizations, care should be taken to select colors geared towards the type of data being presented. General color palettes created for web UIs and/or marketing purposes are not always suitable as the colors can lack contrast and distinguishability or else be visually unsuitable when used together in a data context. Keep in mind that color choice can also impact meaning. |
| 4 | + |
| 5 | +**There are three main types of color palettes used for data visualization:** |
| 6 | + |
| 7 | +1. Categorical palettes |
| 8 | +2. Sequential palettes |
| 9 | +3. Diverging palettes |
| 10 | + |
| 11 | +### Categorical palettes |
| 12 | + |
| 13 | +Use for presenting categorical data that has no intrinsic order, such as a pie or donut chart. Also used for multi-line charts, area charts, stacked or grouped bar charts, etc. |
| 14 | + |
| 15 | +**Categorical palettes should:** |
| 16 | + |
| 17 | +* Use distinct colors. |
| 18 | +* Be limited to a max of 10 colors. |
| 19 | +* Be distinguished primarily by hue. (For accessibility, also use patterns, symbols, or text.) |
| 20 | +* Avoid problematic color pairs (e.g., red-green, an issue for those with color blindness). |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +### Sequential palettes |
| 25 | + |
| 26 | +Use for presenting quantitative or inherently ordered values in a continuum. Useful for heat maps and grouped horizontal bar charts comparing sequential groups such as age ranges, etc. |
| 27 | + |
| 28 | +**Sequential palettes should:** |
| 29 | + |
| 30 | +- Vary lightness or hue to create a graduated color sequence (e.g., light blue to dark blue, blue to yellow) |
| 31 | +- Ensure enough contrast between the lightest and darkest colors to make differences easily perceivable. |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +A graduated color sequence can distinguish elements in visualizations without inherent axes or directions, such as maps or geographic representations. |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +### Diverging palettes |
| 40 | + |
| 41 | +Use for presenting two sequences of ordered values with a shared central value. Useful for diverging bar charts, horizon charts, heatmaps, etc. |
| 42 | + |
| 43 | +**Diverging palettes should:** |
| 44 | + |
| 45 | +- Vary lightness to create two graduated color sequences. |
| 46 | +- Contrast the two color sequences by using different hues. |
| 47 | +- Use lighter values for colors converging towards the center. |
| 48 | + |
| 49 | + |
0 commit comments