Script Categories













Page Details >>> Color Chart.

JavaScript can print out 8 tables with the 512 standard colors and their corresponding #RRGGBB values.

Add the below code to the <body> section of your page:

<center>
<script language="javascript" type="text/javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
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>"); }
// end -->
</script>
</center>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).




©