title: Find best matching colors out of a database
body: <p>We have a database-table where we manage a range of colors.
  In this table we save the following attributes for a color:</p>
  
  <ul>
  <li>RBG-values</li>
  <li>HSV-values</li>
  <li>and Lab-values</li>
  </ul>
  
  <p>Each of those values is in a separate field. What we would like to achieve now is to find the best matching colors if you search for those values.</p>
  
  <p>The user can choose for which of those color-models he wants to do a search.
  Our first approach was to search for those values in the database with a range (so if the user searches for a value 150 of red (RGB) we query the database with <code>BETWEEN 100 AND 200</code>.</p>
  
  <p>The result is not very good, since the values combined are always different from when you search for them and find appropriate rows.</p>
  
  <p>Is there any better approach for searching our database for best matching colors?</p>
  
  <p><strong>Explanation of "best match":</strong><br>
  We want to find the nearest color, so if we search for a red, we just want reds. Maybe it's possible to calculate the percentage of match so the user could choose if it has to be a 100% match or if 50% are also okay.</p>