You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With some images, the dominant color or palette could be very different from the original JS version.
For exemple, with the attached image, Color Thief PHP gives rgb(180, 164, 118) as dominant color (beige), while Color Thief JS gives rgb(30, 36, 19) (dark green), a more accurate color.
The text was updated successfully, but these errors were encountered:
After further testing, it appears that the color returned by the original JS script depends on the on-screen size of the image (CSS width & height properties). The source image is resized by the browser, and then the resized image is used for the dominant color computation. But resizing causes the fusion of some pixels, and therefore some colors are mixed, so the final result is altered.
So it's not a bug of the PHP port ! If you change the CSS of the demo page of the original script so that the image is displayed at full resolution, you should always get the same result in both JS and PHP versions (a few minor differences are possible but it's not visible to the naked eye).
With some images, the dominant color or palette could be very different from the original JS version.
For exemple, with the attached image, Color Thief PHP gives rgb(180, 164, 118) as dominant color (beige), while Color Thief JS gives rgb(30, 36, 19) (dark green), a more accurate color.
The text was updated successfully, but these errors were encountered: