title: Algorithm to check similarity of colors
body: <p>I'm looking for an algorithm that compares two RGB colors and generates a value of their similarity (where similarity means "similar with respect to average human perception").</p>
  
  <p>Any ideas?</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>Since I cannot answer anymore I decided to put my "solution" as an edit to the question.</p>
  
  <p>I decided to go with a (very) small subset of true-color in my app, so that I can handle comparison of colors by my own. I work with about 30 colors and use hard-coded distances between them.</p>
  
  <p>Since it was an iPhone app I worked with objective-C and the implementation is more or less a matrix representing the table below, which shows the distances between the colors.</p>
  
  <p><img src="https://i.stack.imgur.com/bnNPt.png" alt="enter image description here"> </p>