There are lots of clever one-liners for generating random colors:
'#' + Math.floor(Math.random()*16777215).toString(16);
Unfortunately, this code naturally produces lots of greys and browns and murky greens.
randomColor generates attractive colors by default. More specifically, randomColor produces bright colors with a reasonably high saturation. This makes randomColor particularly useful for data visualizations and generative art.
The original domain for this project
llllll.li/randomColor/ is now offline, but the repo is still up. I’m going to make an archived demo here: