Skip to content

Remove dependency on color lib and upgrade version to 2.1.0#6

Merged
rekmarks merged 2 commits intoMetaMask:masterfrom
jmrossy:master
May 7, 2021
Merged

Remove dependency on color lib and upgrade version to 2.1.0#6
rekmarks merged 2 commits intoMetaMask:masterfrom
jmrossy:master

Conversation

@jmrossy
Copy link

@jmrossy jmrossy commented May 7, 2021

Summary

This hoists up the little bit of color manipulation logic needed from the color library in order to remove that dependency. The bulk of jazzicon's bundle size came from color so this significantly reduced it (~20Kb reduction).

It also increases the major version number to mark the change.

Testing

Tested in Safari, Firefox, and Chrome (via https://celowallet.app) on known addresses and can confirm they render correctly.

@jmrossy jmrossy requested a review from a team as a code owner May 7, 2021 15:49
Copy link

@danfinlay danfinlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, happy to remove a dep and reduce bundle size! Will want to do a quick visual verification before pushing to npm, but otherwise looks safe.

@jmrossy
Copy link
Author

jmrossy commented May 7, 2021

Looks good to me, happy to remove a dep and reduce bundle size! Will want to do a quick visual verification before pushing to npm, but otherwise looks safe.

Agreed, visual confirmation from another consumer of the lib would be good!

FWIW here's a quick confirmation from my own app:
Screen Shot 2021-05-07 at 12 20 06

@rekmarks rekmarks merged commit d923914 into MetaMask:master May 7, 2021
mcmire added a commit that referenced this pull request Jul 18, 2024
…)"

This reverts commit d923914.

It seems that the implementation of `hueShift` is slightly different in
this commit than before and therefore produces slightly different colors
as before. Reverting so that we can fix this bug.
mcmire added a commit that referenced this pull request Jul 19, 2024
…)"

This reverts commit d923914.

It seems that the implementation of `hueShift` is slightly different in
this commit than before and therefore produces slightly different colors
as before. Reverting so that we can fix this bug.
mcmire added a commit that referenced this pull request Jul 19, 2024
…)"

This reverts commit d923914.

It seems that the implementation of `hueShift` is slightly different in
this commit than before and therefore produces slightly different colors
as before. Reverting so that we can fix this bug.
georgewrmarshall pushed a commit that referenced this pull request Mar 19, 2025
…24)

Revert "Remove dependency on color lib and upgrade version to 2.1.0 (#6)"

This reverts commit d923914.

It seems that the implementation of `hueShift` is slightly different in
this commit than before and therefore produces slightly different colors
as before. Reverting so that we can fix this bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants