Skip to content

Palette Anti-Patterns

Status: shipped Scope: color palettes DFT rejects or warns on, and why Source: Palette System, research corpus under ai_notes/references/

A handful of famous palettes routinely produce misleading charts. DFT's resolver treats them two ways:

  • Hard fail — the name is not shipped. palette("jet") raises UnknownPaletteError.
  • Warn + alias — the name resolves to the nearest DFT equivalent and the resolver emits an UnsupportedPaletteWarning. Migration paths still work, but you'll see the nudge in logs.

Hard-fail list

Name Why rejected
jet Non-monotonic luminance creates illusory discontinuities and reverses ordering perception. Broadly criticised in the data-vis corpus (Cleveland, Cairo, Kosara). No defensible use remains.
rainbow Same problem — hue steps masquerade as ordered magnitude. Luminance wobbles.
hsv Not perceptually uniform; conflates hue and saturation. Produces banding.

There is no DFT substitute for these because their structure — rainbow, maximal hue excursion — is the anti-pattern itself. If a chart really needs distinct hues, use category-10 (unordered) or dft-seq-blue (ordered).

Warn-and-alias list

Name Aliased to Reason
RdYlGn dft-div-crimson-green The classic red-yellow-green diverging pair is CVD-hostile — deuteranopes can't reliably distinguish the red and green ends. dft-div-crimson-green is the only DFT palette engineered to pass CVD ΔE ≥ 11 on R/G endpoints.
parula dft-seq-blue MATLAB's default; not CVD-safe and superseded by the viridis family in most scientific tooling. dft-seq-blue is DFT's default sequential.

The warning text names the substitution explicitly so dashboards rendered from third-party tooling don't crash, but the suggestion points at the DFT alternative for new work.

When to use which diverging palette

Situation Palette
Default CVD-safe diverging dft-div-blue-red
Political-sensitivity (avoid red/blue) dft-div-orange-teal
Financial loss/gain (red negative, green positive) dft-div-crimson-green — pair with icon + label per R8
Climate / atmospheric data dft-div-sunset (Paul Tol)
Scientific visualization dft-div-coolwarm (Moreland 2009)

References

  • Borland & Taylor, Rainbow Color Map (Still) Considered Harmful (IEEE CG&A, 2007)
  • Kenneth Moreland, Diverging Color Maps for Scientific Visualization (2009)
  • Cindy Brewer et al., ColorBrewer 2.0 — comparative palette library
  • DFT design sessions: ai_notes/palette_studio/session3_diverging.py (CVD R8 engineering)