Use ImageMagick to create a color palette with these 5 colors: convert \Ĭolor Thief names one color as the "dominant" color: rgb(21, 30, 38)Ĭolor Thief also lists a palette of 9 more colors (again, values retrieved from HTML source code): rgb(18, 27, 35)
GIMP CREATE COLOR PALETTE FROM IMAGE CODE
Here is what Embed.ly lists as its 5 extracted colors (I looked at the HTML source code of the page to find out): rgb(13, 28, 37) This is clearly shown by the different results which can be seen when visiting the links you provided for Embed.ly's and for Color Thief's interpretation of your test image.
How would I ensure that ImageMagick includes the red? (apologies if this sounds dumb, color theory is all new to me!).īelow is the image I've been using for testing:Ĭan you define "top 5 dominant colors", please? I think this isn't as easy as it sounds.
Looking at the results of Embedly Extract, the output colors are not necessarily the most frequent but appear to be the clusters that are the most different from each other.įor example suppose I have a very dark image (black/browns) with a small detail in bright red. This leads me on to my next question regarding the quantization algorithm used. Is it better to use a larger color palette and then just select the top n colors? I'm a bit unsure if I should quantize to 5 colors as I've found that doing so doesn't work so well with simple graphics (for example the Google logo). I'd like to replicate the results of Embedly's extract tool or Color Thief.
Here is an example of a palette file *.gpl (Grayscale-Palette-4bpp.I need to generate a color palette of the top 5 dominant colors in an image. This image can now be converted by the GRC for use with the Microchip Graphics Library.