For one of my web applications, I need to randomly select only dark html color codes, which I later use as font colors. So that each time a user refreshes the page, the color of the font changes. But it should change to only dark shades. Is there any way to do it?
I use the following piece of code:
$color = sprintf("#%x%x%x", rand(0,255), rand(0,255), rand(0,255));
Instead of 255, use a much lower limit, like 92.