Given either HSV or RGB, is there an algorithm that can prodice random colors for a background that are guaranteed to be readable on a pure white font?
It does not have to be a language specific implementation, though I am using C#.
Thanks
I made this, but I am sure it could be improved:
public static System.Drawing.Color GenerateRandomLiteColor()
{
var rnd = new Random(DateTime.Now.Millisecond);
double mul = 240.0;
HSLColor c = new HSLColor(rnd.NextDouble() * mul,
((rnd.NextDouble() * 0.6) + 0.5) * mul, ((rnd.NextDouble() * 0.35) + 0.5) * mul);
string s = c.ToRGBString();
return c;
}