Skip to content

[Discuss] tradeoffs on the single-palette guidance for data visualization #3742

@monfera

Description

@monfera

tl;dr

  • category color readability and discernibility may be more important than constant RGB for a categorical value
  • color perception depends a lot on shape and size, and it has direct datavis consequences
  • therefore, we already don't have uniform category colors in the eye of the viewer (plus there's thinning in outer sunburst rings)
  • color thinning for partitioning charts would achieve goals in datavis (more uniform perception and better readability of color), accessibility (higher contrast) and aesthetics (more appealing treemap/sunburst/...)
  • proposed step: use the color-under-text palette for partitioning charts

image
(from Maureen Stone's In Color Perception, Size Matters)


When charts share categories, sharing the value->color assignment helps the reader:

  • the user immediately connects the color with the category, and looking at the second chart will already be with this knowledge
  • it'll also be clear that some charts indeed share the same categorical dimension
  • easier to compare values across charts for the same category - eye movement to the same color
  • fewer eye movements between chart proper and legend swatch
    image

This comment, rightly, refers to this need. Initially it seems like a blocker to possibly using lighter, less saturated colors for partitioning charts that have obligate (treemap) or preferred (pie/sunburst) color backgrounds underneath text.

The two aspects - color unity, and balanced color use - are hard to reconcile on a physical, ie. wavelength / RGB basis, but they seem reconcilable perceptually.

As color sensation heavily depends on geometry and surroundings eg. background color, there are two kinds of issues when sticking to the same exact RGB values:

  1. Within a given chart: with ever smaller geometries, it's getting harder to distinguish among colors; conversely, with increasing size, chroma and darkness become overbearing
  2. Across charts: the same RGB value will look different between eg. a time series chart (thin lines) and a treemap (large areas)

So a RGB color that's OK for a line chart will be a bit too saturated and dark (assuming light background) on a treemap.

There's a variety of results in color discernibility for data visualization purposes.
image

Danielle Szafir suggested research by Maureen Stone, which doesn't suggest an automated way, yet describes the approaches of (briefly)

  • optimizing a color palette for a good balance between small and large shapes - our colorblind palette is designed with this information already, as it got lightened/redesigned when partitioning charts with larger ink areas and text overlays were added
  • allow tweaking eg. lightening/boosting, as even with a balanced singlular palette, there'll be big differences in discernibility and sensation of chroma

...color appearance changes dramatically with the size of the object being viewed
...the strongest colors are darker and more colorful than are ideal for display behind text
When designing colors for very large regions, the challenge is to keep the color from being too dark and too colorful, especially when it is used behind other visual elements, such as text...

We already have precedent for color thinning, as the outer rings of partitioning charts as are in the storybook examples

Other aspects:

  • Accessibility is improved with increased text to background contrast; WCAG constraints are just that (also, some CIELAB assumptions are oversimplifying with reference to perceptual properties)
  • Aesthetics is also important, and the baseline colorblind safe palette is not just dominating but unappealing (imo) with the larger surface of partitioning charts

Action:

  • Design feedback on whether we can test a simple dual palette approach, ie.
    • baseline palette for Cartesian plots and legends, and
    • corresponding colors of the ink-under-text palette for partitioning charts, while also retaining the lightening gradient on sunburst charts. Also, perhaps TSVB should offer color/chroma lightening or boosting options before offering individual color picking
  • looping in Product, as it's about data visualization colors for a (in good part) data visualization solution
  • looping in Maps; much lower likelihood of using the same categorical color assignment for eg. choropleth map (quantitative palette) vs small map markers (typically, categorical palette), but might still be interesting generally, due to large size differences
  • in the future, we might consider slightly higher sophistication than just switching according to chart type, eg. bubble charts could have wildly differing circle sizes, and less often, there are very very thin bars too
  • assuming we'll work with lighter palettes at some point, let's consider legend and color picker boosting, mentioned here: "this made the small samples in the color picker difficult to distinguish. To solve this problem, we systematically increased the chroma of the samples until they were visually distinct"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions