I am trying to randomly generate a color in hex in javascript.
However the colors generated are almost indistinguishable from eachother.
Is there a way to improv
What you are saying is that you do not want to generate random colors, you are saying that you want to generate different colors.
You can find a good tutorial on how to do it here: http://krazydad.com/tutorials/makecolors.php .
I made this fiddle with the relevant code from the tutorial demonstrating how you would generate non-repeating colors:
http://jsfiddle.net/rGL52/
The only differnce from the tutorial code is that the makegradient() function returns an array of colors that you can later apply at will in your page.