Open palmerabollo opened 8 years ago
I added the function dominateColor to my fork. I think it's what you're looking for. You can check it out here
Thanks @MarkOtten. Thats a good starting point. If I understand it well, in a 3x2 image with the following pixels, your function would return blue instead of "red". Is that right?
pixel 0 : (255, 0, 0) pixel 1 : (254, 0, 0) pixel 2 : (253, 0, 0) pixel 3 : (252, 0, 0) pixel 4 : (0, 0, 255) pixel 5 : (0, 0, 255)
That is correct. It looks for an exact match, not a range of colors
Is it possible to get the dominant color or, even better, a representative color palette from an image with lwip? I've not seen that option in the API. Thanks.