Expected behavior:
Setting color, bgColor or spotColor should only change the colors and not the pattern
Rationale
this way, one can customize the blockies palette, while preserving the same pattern as expected (appearing in etherscan, metamask, etc)
Analysis
I think these lines are responsible:
https://github.com/AugurProject/react-blockies/blob/master/src/main.jsx#L141
When you set any of those 3, the createColor is not called for that line, which leads to a different amount of rand() calls, which, changes the pattern result (image data).
A very simple fix would be to call createColor even if color, bgColor or spotColor are set. Thoughts?
Expected behavior:
Setting
color,bgColororspotColorshould only change the colors and not the patternRationale
this way, one can customize the blockies palette, while preserving the same pattern as expected (appearing in etherscan, metamask, etc)
Analysis
I think these lines are responsible:
https://github.com/AugurProject/react-blockies/blob/master/src/main.jsx#L141
When you set any of those 3, the
createColoris not called for that line, which leads to a different amount ofrand()calls, which, changes the pattern result (image data).A very simple fix would be to call
createColoreven ifcolor,bgColororspotColorare set. Thoughts?