Skip to content
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

Closed
daviestar opened this issue Mar 15, 2017 · 9 comments
Closed

Inconsistent values from getPalette() #41

daviestar opened this issue Mar 15, 2017 · 9 comments

Comments

@daviestar
Copy link

daviestar commented Mar 15, 2017

I have a huge list of images that I'm running through node-vibrant. I'm noticing quite often the values of the getPalette() object are null, instead of an instance of Swatch.

Is this a bug or is there some logic behind this? It certainly makes it difficult to programmatically associate some colours with an image.

@cpietsch
Copy link

looks like the vibrant palette (normal/light/dark) is returning sometimes null, whereas the muted is always available.

@AlexThomas90210
Copy link

muted is also null sometimes

@maxcr
Copy link

maxcr commented Jul 27, 2018

When using getRgb shit was broken about 50% of the time. Using getHex returned valid results always.

@maxcr
Copy link

maxcr commented Aug 2, 2018

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.

@crutchcorn
Copy link
Member

crutchcorn commented Dec 26, 2018

#78 fixes this. There's also instructions in that PR that explains how you can use a fixed version of node-vibrant in projects that use npm

@crutchcorn
Copy link
Member

Can someone test against the update 3.1.1 to confirm a fix?

@Kikobeats
Copy link

let me try and pingback if I found problems 👍

@Kikobeats
Copy link

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 🙂

@crutchcorn
Copy link
Member

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants