Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

How to make color scales that don't look generated

The article presents a method for creating custom color scales that feel intentional rather than algorithmically generated, focusing on design principles and manual adjustments to achieve more natural and visually appealing color gradients.

Background

- This guide addresses a problem in data visualization: default color scales (like those in matplotlib, seaborn, or Tableau) often produce harsh, artificial-looking gradients that distract from the data. - The author argues that good color scales should be perceptually uniform (equal numeric steps look equally different to the human eye) and should avoid common pitfalls like muddy browns or sudden hue shifts. - Key concepts include using color spaces like HCL or LAB (which model human vision better than RGB or HSL) and interpolating in those spaces rather than in raw RGB. - The piece introduces practical techniques: using color ramps with a "neutral" midpoint, manually adjusting lightness curves, and borrowing palettes from nature or established systems (e.g., CARTO, Cividis, Viridis). - It also explains why "rainbow" color scales are bad: they introduce false patterns because the eye is not equally sensitive to all colors. - The intended audience is data scientists, developers, and designers who build charts or maps and want their visuals to feel clean and intentional rather than "auto-generated."

Related stories