Colors, gradients, patterns, and shadows
Choosing an effective color scheme for data visualization is no easy task. Colors aren't simply used to make a chart look nicer. Besides distinguishing and suggesting associations between sets of data, they may also communicate information through aspects such as hue, contrast, saturation, or lightness. They can even influence the mood of the viewer. The choice of colors is never neutral. It may attract or repel the viewer from relevant information.
Other aspects may be important, depending on your audience. You may want to use gradients, bevels, and shadows for purely aesthetic reasons, but if your audience requires maximum accessibility, you may also need to consider the use of color-blind-safe palettes or patterns.
Configuring colors
Chart.js supports standard HTML/CSS color names and codes (see Chapter 2, Technology Fundamentals), which are assigned to properties that control fonts, strokes (lines, and borders), and fills. You can select a color...