title: Number of colors after color reduction
body: <p>I want to know how the number of colors are calculated in the following post:</p>
  
  <p><a href="https://stackoverflow.com/questions/5906693/how-to-reduce-the-number-of-colors-in-an-image-with-opencv-in-python?answertab=active#tab-top">How to reduce the number of colors in an image with OpenCV?</a></p>
  
  <p>Liho has mentioned 27 and 125 colors in his comment. Please explain how he got these values. Thanks</p>