title: Programmatically detect colors
body: <p>I'm able to capture the RGB values of colors from a photo, but I want to be able to programmatically detect if that color is a value of Red, Orange, Yellow, Green, Blue, Purple, Tan or White or Black.</p>
  
  <p>So I would need to specify RGB ranges that would return, for example, a value of red... or blue... and so on.  I've got something like this currently, but it doesn't include all the possible RGB varieties.</p>
  
  <p>RED</p>
  
  <p>R = 255, G &lt;= 102, B = 0</p>
  
  <p>R = 255, G = 0, B &lt;= 150</p>
  
  <p>ORANGE &amp; YELLOW</p>
  
  <p>R = 255, G >= 108 &amp; &lt;= 252, B = 0</p>
  
  <p>R = 240, G = 255, B = 0</p>
  
  <p>and so on...</p>
  
  <p>Does anyone know how to take ANY RGB value and detect if it's a value of Red, Orange, Yellow, Green, Blue, Purple, Tan, White or Black?</p>