4 ms·
the palette approach is a little reductive. we've built a solution in this space, a more robust approach would be to get the dominant colour, and from that colo
by LoSboccacc 6y ago
the palette approach is a little reductive. we've built a solution in this space, a more robust approach would be to get the dominant colour, and from that colour brightness and tone extract the accent colour and the contrast colour by considering both distance from the dominant and extent on the image, that solves the problem of having a weighted palette ignoring, say, a red stitching because it's too small
- jrumbut 6y agoYours is the form of solution I was expecting early in the article (though it sounds like you went farther) and I wonder if the author would have ended up with something similar if that library didn't exist. Regarding being reductive though, I think you have to be in this situation. It's a part of a product (not the whole thing) and seems like manual curation could fill in the gaps.
- ComodoHacker 6y ago>extract the accent colour and the contrast colour That wouldn't work for products that have poorly chosen color (which aren't rare) but have the right non-dominant color of customer's brand.
- LoSboccacc 6y agothe opposite really, measuring both tone contrast and luminosity contrast from the background average separately and extracting them is instead more robust for goods that have patterns, i.e. https://www.seven.eu/it_it/seven/zaini.html https://www.seven.eu/it_it/seven/zaini.html it also works both ways, so white elements having a color accent and a dark contrast element still have them recognized for what they are