There are three types of data that require three different color encoding strategies. Categorical data (country, product type, category) requires colors that are maximally distinct — hue-based differentiation where each category gets a different hue, all at similar lightness so no category appears more important than others. Sequential data (temperature from low to high, revenue from small to large) requires a single-hue or two-hue ramp that changes in lightness from light (low values) to dark (high values) — the perceptual ordering is reliable because humans judge lightness differences more accurately than hue differences. Diverging data (values centered around a neutral point, like deviations from average, profit vs. loss) requires a two-hue ramp with a neutral center, where each hue encodes direction (positive vs. negative) and lightness encodes magnitude. Using a sequential palette for categorical data, or a categorical palette for sequential data, is one of the most common and most damaging mistakes in data visualization.
The luminance channel carries the most reliable quantitative information in color-encoded data. Humans perceive differences in lightness (luminance) more accurately and consistently than differences in hue or saturation. This is why sequential palettes work: the ordering of light-to-dark reliably conveys low-to-high. The failure mode of many data visualization tools is defaulting to hue-based sequential palettes (e.g., yellow to red to blue) where the hue changes without a consistent lightness progression — the result is a scale where the perceptual ordering depends on the viewer's hue perception, which varies significantly and is systematically disrupted by color vision deficiency. Rule of thumb: any sequential palette you use should pass as a correct ordering when converted to grayscale. If it does not, the lightness encoding is broken.
Colorblind-safe data visualization palettes are not a nice-to-have — data visualizations are often used by multiple stakeholders in organizational contexts, and a palette that fails for colorblind viewers is inaccessible to approximately 1 in 12 male viewers. The established safe palettes: the Okabe-Ito palette for categorical data (8 distinct colors that work for deuteranopia, protanopia, and tritanopia); viridis, inferno, and cividis for sequential data (all designed to be perceptually uniform and colorblind safe). For diverging data: use purple-green or orange-purple rather than red-green. Test every visualization using a colorblind simulation tool before publishing. Many charting libraries include built-in colorblind-safe palettes — prefer these over custom color choices when the chart is in a context where colorblind-safe data communication is required.