Finding nearest match RGB color from array of colors
<p>I know I need to use a loop to look in the <code>$palette</code> Array, but I need help making the color comparison.</p>

<p>GOAL is to find the nearest value of <code>$rgbcolor</code> to <code>$palette</code> and show the color that matches from <code>$palette</code>.</p>

<pre><code>&lt;?php
  //input color
  $rgbcolor = array(110,84,43); 
  //listed color
  $palette = array(
      array(238,216,152),
      array(252,216,113),
      array(253,217,0),
      array(255,208,62),
      array(255,182,20),
      array(206,137,0),
      array(235,169,0),
      array(170,137,0),
      array(173,132,28),
      array(183,131,0),
      array(139,120,37),
      array(108,86,26)
  );
?&gt;
</code></pre>