I am working on a MVC 4 Project and my view renders a table with multiple rows and columns based on data passed my model. I want to populate each box with different color. It needs to be random, I do not want to keep an array of colors as number of fields in table may vary.
Asked
Active
Viewed 66 times
0
-
what I have read of developers doing in this case is generate a MD5 based on some data and then translate that to a color code using an algorithm. hope this helps... – DrCord Jun 07 '13 at 17:40
-
http://stackoverflow.com/questions/7263140/random-color-generation-using-php – teynon Jun 07 '13 at 17:41
-
I found the link to the stack overflow I read it on: http://stackoverflow.com/questions/3724111/how-can-i-convert-strings-to-an-html-color-code-hash – DrCord Jun 07 '13 at 17:41