Code for my Javascript Colortable Automatic Art Generator - Copy and Paste and Modify at will... Reload Page for a Different Pattern

Screenshot of my Javascript Colortable Progran - gvan42
This is an Unchanging Image... 
The Actual Program is Below the Code... 
 
<html><body>
<script type = "text/javascript"> 
//this is the javascript code for generating colortables
// reload page for a different pattern
// copy and paste all code into notepad...
// save the file. With a name.html (ending with dot html)
// change dropdown box from text to all files... save it.
// open file with a browser to see table displayed
// open file with notepad to modify code
// PrtScn and paste into Photoshop
var rc=1; 
//red color from 0 to 255
var rcf=Math.floor( Math.random() *23 ); 
//red color factor- how fast red changes
var gc=1; 
var gcf=Math.floor( Math.random() *24 ); 
var bc=1; 
var bcf=Math.floor( Math.random() *25 ); 
//document.write(rcf, " ", gcf, " ",  bcf);
//display the random numbers selected
for ( i = 0; i < 46; i++ ) 

document.write("<table cellspacing=0 cellpadding=0 border=0 ><tr>"); 
for (j=0;j<72; j++)

//counters that go up then start again at the bottom
//or count downwards and loop around to the top...
rc=rc+rcf; 
if(rc<0) rc=rc+255;
if(rc>255) rc=rc-255; 
// make sure colors are withing valid range
gc=gc-gcf; 
if(gc<0) gc=gc+255;
if(gc>255) gc=gc-255; 
bc=bc-bcf; 
if(bc<0) bc=bc+255;
if(bc>255) bc=bc-255;
document.write("<td height=20 width=20 style=background-color:rgb("+rc+","+gc+","+bc+")></td>"); 
//make sure the above command is all on one line
//beware of wordwrap bugs

document.write("</tr></table> "); 

</script>
</body></html>


Popular Posts

Popular Posts