[Feat] Ability to tint icon in iconlayer
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 14.6k
- Forks
- 2.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Description
Target Use Case
Currently iconlayers let you either use the source icon colour (if mask is false) or the output of getColor (if mask is true). I would like to be able to instead multiply the icon colour with the output of getColor have more control over what is rendered (e.g. my image is a black&white image, so when tinted it still has an outline / details).
Proposal
Presumably this would involve adding a 3rd parameter to the mapping that would be checked if mask is false, something like 'tint'. Then in the fragment shader would have to handle this to add the tint approach.
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 locating the iconlayer color mapping and its fragment shader. Trace how mask and getColor currently affect rendering, then implement the proposed tint behavior for non-masked icons so the source icon color is multiplied by getColor; done means black-and-white icons retain their details while applying the requested tint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100