There are three types of color scales in data visualization, and each requires a different color strategy. Sequential scales represent ordered data from low to high (e.g., population density, revenue). They should use a single hue with lightness varying from light (low) to dark (high), or two hues that transition through a neutral. Diverging scales represent data with a meaningful midpoint (e.g., temperature above/below freezing, survey agreement/disagreement). They should use two contrasting hues meeting at a neutral center. Categorical scales represent unordered groups (e.g., product categories, geographic regions). They should use hues that are maximally distinct with equal perceptual weight — avoiding any hue that reads as more important than others.
Rainbow color scales (ROYGBIV) are one of the most persistent mistakes in data visualization. They look like they should encode a range, but they don't: the perceived brightness of rainbow hues is uneven (yellow is much lighter than blue), which creates false visual emphasis. Green appears more important than red or violet simply because of its position in the visual hierarchy. The ordering is not perceptually linear — the gap between red and orange appears larger than the gap between green and teal even if the underlying data gap is identical. Use perceptually uniform color scales (viridis, cividis, plasma) for quantitative sequential data instead.
Color blindness affects approximately 8% of men and 0.5% of women, with red-green color vision deficiency (deuteranopia and protanopia) being the most common form. A chart that encodes the distinction between positive and negative values using only red and green will be completely unreadable to this population. The fix is to use both color and a secondary encoding — shape, position, pattern, or label — for any distinction the chart depends on. Never rely on color as the sole differentiator for critical data.