adobe / adobe/leonardo

"Long" interpolation option

Open
#51 0 comments 1 reaction 0 assignees View on GitHub
enhancement npm packages
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:
![image](https://user-images.githubusercontent.com/13972198/73402925-997a6e80-42ab-11ea-98d3-50846b7f78a8.png)

Without "long" interpolation:
![image](https://user-images.githubusercontent.com/13972198/73402890-823b8100-42ab-11ea-9816-0f8200d0a591.png)

Same scale using "long" interpolation:
![image](https://user-images.githubusercontent.com/13972198/73402866-6e901a80-42ab-11ea-81e8-3b2317b14a7a.png)

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.