title: Process image with Imagemagick to "default palette" (for example 16 or 256 colours)
body: <p>Currently I'm processing image to extract main colors from it with such: </p>
  
  <pre><code>-resize '50x50' -colors '8' -colorspace 'RGB' -quantize 'RGB' '/tmp/downsampled20190502-27373-iqgqom.png'
  </code></pre>
  
  <p>However, it returns me a lot of colours, so I have to limit them to the main palette (like white/black/red/etc), so I guess 8 or 16 colours would be enough for me.</p>
  
  <p>I thought that <code>-colors '8'</code> should process it, however, it only returns primary 8 colours from the image.</p>
  
  <p>Do you have any ideas about how I could extract colours and convert them to 3-bit (8-color palette) </p>
  
  <p><em>I though convert it to GIF, however GIF contains 256 colour palette.</em></p>