d3-scale-interactive

What does it do?

Interactively play with your scales in any vis, just by replacing your initialization of the scales from

const colorScale = d3.scaleSequential(...);
with
const colorScale = d3.scaleInteractive('color', updateChart).scaleSequential(...);
This way it's easy to develop with/turn on and off. Maybe there could even be a check to see if we're in dev otherwise just return the scale as it is and do nothing.

Example

color = d3.scaleInteractive('color', updateChart)
  .scaleSequential(d3.interpolateMagma)
  .domain(d3.extent(data, d => d.v));

Code on GitHub