xataku_nakusute
07-28-2003, 07:56 PM
how can i produce a color pallette for my users to refer to while inputting color data into a form?
|
Click to See Complete Forum and Search --> : color pallette xataku_nakusute 07-28-2003, 07:56 PM how can i produce a color pallette for my users to refer to while inputting color data into a form? Gollum 07-29-2003, 02:46 AM You could try a table... <table border=1 style="cursor:default"> <tr> <td style="background:white" onclick="alert('you clicked white');"> </td> <td style="background:red" onclick="alert('you clicked red');"> </td> <td style="background:green" onclick="alert('you clicked green');"> </td> <td style="background:blue" onclick="alert('you clicked blue');"> </td> </tr> <tr> <td style="background:black" onclick="alert('you clicked black');"> </td> <td style="background:cyan" onclick="alert('you clicked cyan');"> </td> <td style="background:magenta" onclick="alert('you clicked magenta');"> </td> <td style="background:yellow" onclick="alert('you clicked yellow');"> </td> </tr> </table> xataku_nakusute 07-29-2003, 03:41 AM i wanted to make it with javascript so that it mass-produces table cells and makes the background of each one a different color at incrementing values this is the code i have so far: <script type="text/javascript"> clr=new Array('00','20','40','60','80','a0','c0','ff'); for (i=0;i<8;i++) { document.write("<table border=1 cellpadding=8>"); for (j=0;j<8;j++) { document.write("<tr>"); for (k=0;k<8;k++) { document.write('<td bgcolor="#'+clr[i]+clr[j]+clr[k]+'">'); document.write('<tt><font color="#'+clr[7-i]+clr[7-j]+clr[7-k]+'"> '); document.write(clr[i]+clr[j]+clr[k]+' </font></tt></td>'); } document.write("</tr>"); } document.write("</table><br>"); } </script> webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |