How do I extract the colors from an image, like in this example
<p>Can someone point me in the right direction on how to implement something like this in c#. How do I extract the colors from the image?</p>

<p><strong>Edit</strong>
I'm trying to accomplish something like this:
<a href="https://i.stack.imgur.com/8kurB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8kurB.jpg" alt="enter image description here"></a></p>