title: Functions that calculate distance between HEX colors and eliminate colours too similar
body: <p>I have a simple PHP function that generates the hexadecimal value for HTML colors and insert them in a db. </p>
  
  <p>Considering an array of hexadecimal values extracted from the db, how can I modify this function to avoid generating a color similar to the others?</p>