Open AursorDev opened 1 year ago
Why was this closed without a solution/fix?
I ran into this yesterday too.
It's because color-thief will fail on any image that only has white/near-white pixels: https://github.com/lokesh/color-thief/blob/4dc3bb0b43250f0d006278998aa91c4156f77cc3/src/core.js#L12-L17
wow,you responsed me! ok, i see this,but i don't know why can't support the image in pure color
发件人: Tim Van @.> 发送时间: 2024年4月17日 16:19 收件人: lokesh/color-thief @.> 抄送: 浮云 @.>; Author @.> 主题: Re: [lokesh/color-thief] if a image just have a color, "getPalette" methods is throw error (Issue #242)
I ran into this yesterday too.
It's because color-thief will fail on any image that only has white/near-white pixels: https://github.com/lokesh/color-thief/blob/4dc3bb0b43250f0d006278998aa91c4156f77cc3/src/core.js#L12-L17
― Reply to this email directly, view it on GitHubhttps://github.com/lokesh/color-thief/issues/242#issuecomment-2060677670, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXGW4TCLLYGQUNREP7YRUILY5YV7LAVCNFSM6AAAAAAZLRXDD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRQGY3TONRXGA. You are receiving this because you authored the thread.Message ID: @.***>
Hello When I use it to get color,i upload this image,but it is throw error white image
and the code is: