adobe / adobe/design-website

alternate colormap mechanism

Open
#42 0 comments 0 reactions 0 assignees View on GitHub
refactor
Dominant language
CSS
Stars
9
Forks
13
PR merge metrics
No merged PRs in 30d

Description

the current way of loading the colormap as an import has the drawback that it is blocking the LCP load and also renders the free selection of an arbitrary color via its hex value somewhat impaired. i think a more general approach might be to calculate the lightness the hex value by averaging the r, g, b values and decide based on that if the `color` needs to be light or dark.
alternatively, moving the colorMap into `scripts.js` would remove the performance impact.

Contributor guide

Open the contributing guide

Research direction

Inspect how the colormap is currently imported and how `scripts.js` handles related color behavior. Compare the proposed lightness calculation with moving the colormap into `scripts.js`; the work is done when arbitrary hex colors no longer impair light/dark selection and the colormap no longer blocks LCP.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.