-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent values from getPalette() #41
Comments
looks like the vibrant palette (normal/light/dark) is returning sometimes null, whereas the muted is always available. |
muted is also null sometimes |
When using getRgb shit was broken about 50% of the time. Using getHex returned valid results always. |
I eventually just had to use nested loops to see if certain color codes were returning null, and then see if the entire swatch itself was returning null otherwise the promise chain breaks. Probably not very efficient but now my colors load properly in the correct order every time. |
#78 fixes this. There's also instructions in that PR that explains how you can use a fixed version of |
Can someone test against the update |
let me try and pingback if I found problems 👍 |
In fact @crutchcorn you can close this, I will comment again if I detect a weird behavior. Thanks for your effort and time improving the project 🙂 |
That's probably for the best, thinking about it more. I have been using the code in a project and have confirmed a fix on my own project. Appreciate keeping an eye out for issues @Kikobeats , feel free to bump thread if issues in future like you mentioned :) |
I have a huge list of images that I'm running through
node-vibrant
. I'm noticing quite often the values of thegetPalette()
object arenull
, instead of an instance ofSwatch
.Is this a bug or is there some logic behind this? It certainly makes it difficult to programmatically associate some colours with an image.
The text was updated successfully, but these errors were encountered: