title: How to check RGB colors against a color range?
body: <p>I am writing a python script where I need to check colour code against 3 colours: red, yellow and green in this way:</p>
  
  <pre><code>if (255,255,255)  is in green range:
      print("green")
  else if (255,255,255)  is in yellow range:
      print("yellow")
  else if (255,255,255)  is in red range:
      print("red")
  else:
      print("none")
  </code></pre>
  
  <p>The thing I am having trouble is with how to see if it <code>is in yellow range</code>?</p>
  
  <p>Any suggestions will be appreciated.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The following picture represents my sense of yellow, green and red:</p>
  
  <p><a href="https://i.stack.imgur.com/tmrgD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tmrgD.png" alt="enter image description here"></a></p>