Add fallback option for ramps, scales and curves
Open
Nobody has claimed this yet.
api :memo:
cross-platform :tv:
feature :green_apple:
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Motivation
Mapbox already asigns the colour black as a fallback output for out-of-range inputs, so why not leave the use decide which colour should that be?
Implementation
["interpolate" | "interpolate-hcl" | "interpolate-lab" | "step",
interpolation: ["linear"] | ["exponential", base] | ["cubic-bezier", x1, y1, x2, y2 ], // if not discrete
input: number,
stop_output_0: OutputType,
stop_input_1: number, stop_output_1: OutputType,
stop_input_n: number, stop_output_n: OutputType,
...,
fallback: OutputType
]: OutputType
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the interpolate, interpolate-hcl, interpolate-lab, and step expressions handle out-of-range inputs. Define completion as allowing the proposed fallback output to control the result instead of always using black, while preserving the existing interpolation forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100