Generate Random Color distinguishable to Humans
<p>I am trying to randomly generate a color in hex in javascript.</p>

<p>However the colors generated are almost indistinguishable from eachother.
Is there a way to improve it?</p>

<p>Here is the code I am using:</p>

<p><pre><code>
function randomColor(){</p>

<p>var allowed = "ABCDEF0123456789", S = "#";</p>

<pre><code>   while(S.length &lt; 7){
       S += allowed.charAt(Math.floor((Math.random()*16)+1));
   }
   return S;
}
</code></pre>

<p></pre></code></p>

<p>I heard something about HSL and HSV color model but can't get
it to work in my code. Please help.</p>

<p>Thanks in Advance</p>
