Comments (6)
I'm seeing the same problem. Can anyone publish, please? @jmrossy, @whymarrh
from jazzicon.
Sorry for the delayed response @lukaw3d, I will look into this soon.
Also sorry everyone else for the delay in releasing 2.1.0. This library is set up different from our other libraries so it's a lot more painful to release it. Hopefully we can get it synced soon.
from jazzicon.
This library is easier to use. https://www.npmjs.com/package/@cfx-kit/wallet-avatar
from jazzicon.
I tried to verify if generated colors after #6 are the same. They are not.
I don't think 2.1.0 version should be published.
Here's a test of hueShift function with zero shift:
// @file test.js
// Since index.js does not export hueShift function just eval the code in current scope
const sourcecode = require('fs').readFileSync('./index.js', 'utf-8')
eval(sourcecode)
console.log('Preset colors\n' + colors.slice().join(','))
// Force random=0.5 => hueShift amount=0 => expect no change in colors
generator = { random: () => 0.5 }
console.log('0 hueShift colors\n' + hueShift(colors.slice(), generator).join(','))
run node test.js
-
Before #6:
❗0 hueShift
do not matchpreset colors
. Original implementation of hueShift was wrong.Preset colors #01888C,#FC7500,#034F5D,#F73F01,#FC1960,#C7144C,#F3C100,#1598F2,#2465E1,#F19E02 0 hueShift colors #01898E,#FA7500,#03505E,#F93F01,#FB1860,#C8144D,#F5C400,#189AF2,#2366E1,#F29E02
-
After #6:
❗0 hueShift
do not matchpreset colors
. New implementation of hueShift is wrong.
❌0 hueShift after #6
do not match0 hueShift before #6
. New implementation of hueShift is wrong differently!Preset colors #01888C,#FC7500,#034F5D,#F73F01,#FC1960,#C7144C,#F3C100,#1598F2,#2465E1,#F19E02 0 hueShift colors #01878c,#fc7600,#034f5d,#f73e01,#fc1961,#c7144d,#f3c200,#159af2,#2466e1,#f19d02
-
(Before #6 but upgrade [email protected] or [email protected], and replace "hexString()" with "hex()")
Preset colors #01888C,#FC7500,#034F5D,#F73F01,#FC1960,#C7144C,#F3C100,#1598F2,#2465E1,#F19E02 0 hueShift colors #01888C,#FC7500,#034F5D,#F73F01,#FC1960,#C7144C,#F3C100,#1598F2,#2465E1,#F19E02
from jazzicon.
Likewise, sorry if my PR #6 modified the colors slightly, that wasn't intentional. Thank you @lukaw3d for testing more closely and spotting the difference.
I do still think there's benefit to reducing the dependencies here. Would someone like to fix the hueshift method? If not, I may be able to find time to take another crack at this.
from jazzicon.
Sorry for the delay in getting back to this issue. For the time being I have reverted the changes in #6 in a new PR, #24, so that we can create a new release and then re-implement that PR later.
from jazzicon.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jazzicon.