"Long" interpolation option
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
## Description
In d3-interpolate, there are options for whether to interpolate the shortest distance between colors (default) or to interpolate the further of the distances (along the color wheel).
## Why do you need this feature?
When creating scales that span more than 180 degrees in hue, the "long" option is needed, otherwise interpolation happens on the opposite side of the color wheel.
## Leonardo package and version
`@leonardo-contrast-colors v1.0.0-alpha3`
## Additional context
Example color scale:

Without "long" interpolation:

Same scale using "long" interpolation:

Contributor guide
Research direction
The issue points to d3-interpolate and color-scale hue interpolation; start by locating the existing shortest-distance color interpolation entry point and its tests. Done means a long-distance option supports scales spanning more than 180 degrees, with the behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- d3, javascript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100