title: Assigning background color to classes from array
body: <p>I have six div's on a page that each have the same class. I am trying to assign each of them one unique color that I have chosen in an array. I don't want any of them to have the same color. </p>
  
  <p>I've successfully assigned each of the divs a background color from an array, however, some of the classes can get the same background color since its currently just choosing the color randomly from the array. </p>
  
  <pre><code>jQuery(document).ready(function($) {
  $(".et_pb_post").each(function() {
    var colors = ["#CFEAEA ","#c9e3d5","#e7dadd","#dde9eb","#ecfac7","#facba9","#dfdbd3","#f1fdc1"];                
    var rand = Math.floor(Math.random()*colors.length);    
      $(this).css("background-color", colors[rand]);
  });
  });
  </code></pre>
  
  <p>and then the html is something like</p>
  
  <pre><code>&lt;div class="et_pb_post"&gt;Some content with bg-color A&lt;/div&gt;
  &lt;div class="et_pb_post"&gt;Some content with bg-color B&lt;/div&gt;
  &lt;div class="et_pb_post"&gt;Some content with bg-color C&lt;/div&gt;
  &lt;div class="et_pb_post"&gt;Some content with bg-color D&lt;/div&gt;
  </code></pre>
  
  <p>How do I make sure all of the background-colors are unique?</p>
  
  <p>Thanks a lot!</p>