title: Python Opencv Color range histogram
body: <p>I'm working in a project in which I would like to get a custom histogram from a given image.</p>
  
  <p>Let's say I want to count the number of pixels of three colors:</p>
  
  <ol>
  <li>Light brown.</li>
  <li>Blue.</li>
  <li>Red.</li>
  </ol>
  
  <p>I find easy to count the pixel that matchs a concret color, But I would like to give the colors a threshold, and here is my problem.</p>
  
  <p>How can I do a good threshold that will reflect almost Light brown color or almost red, etc...</p>
  
  <p>Thanks. </p>