How to get a color palette from an image using OpenCV
<p>I'd like to extract the color palette of an image, similar to this (from <a href="http://labs.tineye.com/color/6ade04a2688d7c1db6d98b292f72116bc1904287?ignore_background=True&amp;width=250&amp;color_format=hex&amp;ignore_interior_background=True&amp;height=175" rel="nofollow noreferrer">here</a>):</p>
<p><a href="https://i.stack.imgur.com/QG3Wr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QG3Wr.png" alt="Enter image description here" /></a></p>
<p>I need it to extract specific colors, like yellow, green, and brown and display the percentage of the area covered by that color. Also, I can add more colors to extract.</p>
<p>How can I reduce the number of colors in the original image, and how can I get the color palette?</p>