On Fri, Aug 26, 2011 at 3:04 PM, Joshua Paine <[email protected]>wrote:
> > maybe there should be a "minimum distance" between color values? But we > > can't know that without comparing against all existing values, which is > > of course too much effort. > > > I have no idea what the current algorithm is.... > 40 lines of code here: http://www.fossil-scm.org/fossil/artifact/3f877bd500?ln=116-156 Outline: (1) Hash the string to get an integer. (2) Convert the integer into an HSV color with reasonable bounds for a background color (3) Convert the HSV color into an RGB color There are opportunities for improvement in the hash algorithm and by tweaking parameters in the HSV color selection. Suggestions are welcomed. -- D. Richard Hipp [email protected]
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

