Predominantly choosing a color scheme in a report or dashboard is typically influenced by factors such as branding, corporate communications, user preferences, corporate themes etc. Little attention is given to the type data while choosing the right palette. Data can be broadly classified into two categories based on the values it represents. A continuous variable data can cover a wide range of values whereas discrete variable data assumes distinct values.
It is always better to go with the gradient approach for continuous data where we can mark the low and high end of the spectrum based on gradient colors of the KPI. A gradient palette also implicitly indicates whether the values are good or bad for the data point that is represented. Lighter colors can mean good or low and darker colors can indicate bad or high within the data range.
Discrete palettes should be used when clear distinctions are to be made between data points. These palettes come in handy when a visualization uses the color property to represent second or third dimension in a chart.
Selecting the right palette will communicate more clearly the correct characteristic of the underlying data. Correct palette selection is the first step and typically a fine tuning step is required where other factors as mentioned in the first paragraph are taken into consideration for the final color scheme.
Colors schemes are highly subjective in nature and perception can vary greatly between two users. A great deal of study has been undertaken under the topic “Color Psychology” that deals with human interpretation of colors.
NOTE: In R, ggplot based graphic functions are intelligent enough to switch based on the data type i.e. categorical vs numeric between a discrete and gradient color palette.