Closed fordhurley closed 6 years ago
You've hit a limitation of the color quantization algorithm, what you can do is increase the sample frequency to make it more accurate, options.quality
or use the (undocumented because buggy) globalPalette
option
I'm seeing some really bad color palette issues when trying to use this, possibly because I'm trying to push it too far. Here's what I'm seeing:
Generated with this code:
Link to codepen.
Now, I know that gifs aren't going to encode gradients well, due to the limited color depth. My problem is that the emoji in the center is so unstable, changing drastically from frame to frame. In fact, if I remove the gradient and just use a moving 2 color background, I still see issues with the emoji, although not as bad:
Codepen for this gif.
Am I trying to push gif.js too far, or is this the result of a bug?