color-thief icon indicating copy to clipboard operation
color-thief copied to clipboard

color-thief detects wrong color

Open spidercode opened this issue 3 years ago • 2 comments

Hi,

I have this sample code that detects color using color-thief

https://jsfiddle.net/spidercode/k6Lumq8y/1/

when I run this, it detects the color which is different in the shade. The color which I am expecting ( RGB(0, 150, 209) ) is not being detected by color-thief.

image

I might be doing something wrong. But couldn't figure it out.

spidercode avatar Jan 04 '22 10:01 spidercode

I had a similar issue a while ago, when trying to detect the dominant color of an image the value returned would always be a little off, unfortunately I couldn't find a solution that would not involve rewriting the entire code.

It's sad but apparently color-thief is no longer actively maintained.

LuccaGarcia avatar Jan 23 '22 14:01 LuccaGarcia

It's a problem caused by its core dependency, quantize, which produces the wrong result.

benjaminvanrenterghem avatar Jun 03 '22 21:06 benjaminvanrenterghem